SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Image optimization
          For the Web




   Guilherme Zühlke O’Connor
         http://www.z-oc.com
Optimise what?

• Data transfer (file size)
• HTTP requests
• File maintenance
• File References in Code
File size

• Colour system
• Number of colours effectively used
• Image format
• Image size
File Size by          Save As - PNG - 8247 bytes (8Kb)

   Palette       Save for Web - PNG 24 - 5471 bytes (5Kb)


    (png)      Save for Web - PNG 8 - 128c - 4478 bytes (4Kb)

   500x20px
               Save for Web - PNG 8 - 20c - 1259 bytes (1.2Kb)
   Gradient
                   Save for Web - PNG 8 - 16c - 716 bytes


                    Save for Web - PNG 8 - 8c - 507 bytes
File Size by
   Palette
    (gif)      Save for Web - GIF - 128c - 5260 bytes (5Kb)

   500x20px
               Save for Web - GIF - 20c - 1772 bytes (1.7Kb)
   Gradient
                   Save for Web - GIF - 16c - 1071 bytes


                    Save for Web - GIF - 8c - 765 bytes
File Size by   Save As - JPG - Q10/12 - 20686 bytes (20Kb)

compression     Save for Web - JPG - 100% - 2016 bytes (2Kb)


     (jpg)          Save for Web - JPG - 60% - 732 bytes

    500x20px
                    Save for Web - JPG - 30% - 571 bytes
    Gradient
                    Save for Web - JPG - 5% - 490 bytes
Jpeg format
• RGB or Grayscale
• There is no lossless Jpeg
• Good for gradients and loose edges
• Poor for simple images
• No precise control over the colour palette
• Sacrifices chrominance, optim. luminance
Save for Web
Save for Web                              Save for Web
                 Jpeg 15%
 PNG8 - 8c                                 Jpeg - 15%
                200x300px
 100x160px                                 100x160px
                2121 bytes
  997 bytes                                5577 bytes
                              http://flickr.com/photos/annazuhlke/3254769257/




         Jpeg Vs. Png
PNG format
• 24 or up to 8 bits (RGB, GS or Indexed)
• Lossless compression
 • Colorspace Reduction != Compression
• Poor compression for complex gradient
  patterns
• Alpha or 1-bit transparency (Probs in IE)
Save for Web
Save for Web                              Save for Web
               PNG 8 - 128c
 JPEG - 30%                                 PNG 24
                200x300px
 200x300px                                 200x300px
               22,170 bytes
 7,869 bytes                              95,130 bytes
                              http://flickr.com/photos/annazuhlke/3252543983/




 Photo rendering
GIF format

• Up to 8 bits, indexed colour (up to 256c)
• Lossless compression
• 1 bit transparency
• Generally poorer compression than PNG
Save for Web      Save for Web
 PNG 8 - 128c       GIF - 128c
  200x300px         200x300px
 22,170 bytes      28,930 bytes
                http://flickr.com/photos/annazuhlke/3252543983/




Photo rendering
Colour Sytems

• RGB
• Grayscale
• Indexed Colour
RGB

• Each pixel is represented by 24 bits
• Three channels (R,G & B)
• 8 bits each
Grayscale

• Each shade of gray is represented by 8 bits
• 256 shades of gray overal
• 1/3 of the basic file size for a non-colour
  image, compared to RGB
Indexed Colour

• Each pixel is represented by up to 8 bits
• A colour palette is created
• Each colour in the palette is referenced by
  the (up to) 8 bits number
Cool!
Can I create my colour palettes in photoshop
   beforehand so I have precise colours?
Yes, you can!
Image Sizes
Size of compressed image files don’t increase linearly to
                 the number of pixels
File Size by   Save for Web - 500x20px - 507 bytes

 pixel qty     Save for Web - 300x20px - 392 bytes


    (png)      Save for Web - 100x20px - 248 bytes

    PNG-8
               Save for Web - 10x20px - 190 bytes
   8 colours
                Save for Web - 1x20px - 162 bytes
The less the merrier?
Consider the rendering effort of tiling the image on the
                      browser.
Sprites
Multiple page assets in a single image
Having a single file...

• It’s easier to maintain the image
• It’s easier to deploy
• Only one HTTP request
• File size growth is sublinear on number of
  pixels and colours
Save for Web - 8c -100x20px - 248 bytes

Arithmetic
248 x 4 x 4 = 449?
                     Save for Web - 32c -100x80px - 449 bytes
More
     assets            Save for Web - 48c
                           100x160px
   The beauty of            837 bytes
sublinear increment!
                                            Save for Web - 48c
                                                100x240px
                                                 899 bytes
If you maintain the
     files, you know...
• Nothing is more boring and inefficient than
  saving, exporting maintaining and organizing
  a lot of files
• You’ll have better use for your time and
  attention polishing and optimizing one file,
  rather than several
http://flickr.com/photos/guioconnor/332026161/




Tiny and robust
Last but not least:
      (automate it)
http://smush.it
Smush.It

• Lossless and extreme optimization
• Quick and Simple
• Be aware of confidentiality issues
  processing images on a site external to the
  company.
?
Questions
 gui@z-oc.com

Contenu connexe

Similaire à Image Optimization for The Web

Preparing images for the Web
Preparing images for the WebPreparing images for the Web
Preparing images for the Websdireland
 
We should optimize images
We should optimize imagesWe should optimize images
We should optimize imagesShogo Sensui
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web ImagesSteve Guinan
 
Weniger aus Bilder holen
Weniger aus Bilder holenWeniger aus Bilder holen
Weniger aus Bilder holenWalter Ebert
 
Retina Display - Supporting in Web Projects
Retina Display - Supporting in Web ProjectsRetina Display - Supporting in Web Projects
Retina Display - Supporting in Web ProjectsMark Riggan
 
Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers Cloudinary
 
Image optimization q_auto - f_auto
Image optimization q_auto - f_autoImage optimization q_auto - f_auto
Image optimization q_auto - f_autoCan Ozdoruk
 
PowerPoint 97
PowerPoint 97PowerPoint 97
PowerPoint 97Videoguy
 
A Picture Costs A Thousand Words
A Picture Costs A Thousand WordsA Picture Costs A Thousand Words
A Picture Costs A Thousand WordsGuy Podjarny
 
Image Optimization for the Web at php|works
Image Optimization for the Web at php|worksImage Optimization for the Web at php|works
Image Optimization for the Web at php|worksStoyan Stefanov
 
Commonly Used Image File Formats
Commonly Used Image File FormatsCommonly Used Image File Formats
Commonly Used Image File FormatsFatih Özlü
 
FIWARE Tech Summit - Challenges of Streaming HQ 360 Videos
FIWARE Tech Summit - Challenges of Streaming HQ 360 VideosFIWARE Tech Summit - Challenges of Streaming HQ 360 Videos
FIWARE Tech Summit - Challenges of Streaming HQ 360 VideosFIWARE
 
Stem 71 24 multimedia elements - graphics
Stem 71 24   multimedia elements - graphicsStem 71 24   multimedia elements - graphics
Stem 71 24 multimedia elements - graphicsKelly Bauer
 
Encoding Video for the Web - Webinar from ReelSEO.com
Encoding Video for the Web  - Webinar from ReelSEO.comEncoding Video for the Web  - Webinar from ReelSEO.com
Encoding Video for the Web - Webinar from ReelSEO.comMark Robertson ⏩
 
Blu-Ray Final2
Blu-Ray   Final2Blu-Ray   Final2
Blu-Ray Final2Schoonts
 

Similaire à Image Optimization for The Web (20)

Preparing images for the Web
Preparing images for the WebPreparing images for the Web
Preparing images for the Web
 
We should optimize images
We should optimize imagesWe should optimize images
We should optimize images
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
 
Artdm171 Week6 Images
Artdm171 Week6 ImagesArtdm171 Week6 Images
Artdm171 Week6 Images
 
Weniger aus Bilder holen
Weniger aus Bilder holenWeniger aus Bilder holen
Weniger aus Bilder holen
 
Intro To Resolution
Intro To ResolutionIntro To Resolution
Intro To Resolution
 
Retina Display - Supporting in Web Projects
Retina Display - Supporting in Web ProjectsRetina Display - Supporting in Web Projects
Retina Display - Supporting in Web Projects
 
Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers
 
Image optimization q_auto - f_auto
Image optimization q_auto - f_autoImage optimization q_auto - f_auto
Image optimization q_auto - f_auto
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
 
PowerPoint 97
PowerPoint 97PowerPoint 97
PowerPoint 97
 
MMT image & graphics
MMT image & graphicsMMT image & graphics
MMT image & graphics
 
A Picture Costs A Thousand Words
A Picture Costs A Thousand WordsA Picture Costs A Thousand Words
A Picture Costs A Thousand Words
 
Image Optimization for the Web at php|works
Image Optimization for the Web at php|worksImage Optimization for the Web at php|works
Image Optimization for the Web at php|works
 
Commonly Used Image File Formats
Commonly Used Image File FormatsCommonly Used Image File Formats
Commonly Used Image File Formats
 
Vste r2
Vste r2Vste r2
Vste r2
 
FIWARE Tech Summit - Challenges of Streaming HQ 360 Videos
FIWARE Tech Summit - Challenges of Streaming HQ 360 VideosFIWARE Tech Summit - Challenges of Streaming HQ 360 Videos
FIWARE Tech Summit - Challenges of Streaming HQ 360 Videos
 
Stem 71 24 multimedia elements - graphics
Stem 71 24   multimedia elements - graphicsStem 71 24   multimedia elements - graphics
Stem 71 24 multimedia elements - graphics
 
Encoding Video for the Web - Webinar from ReelSEO.com
Encoding Video for the Web  - Webinar from ReelSEO.comEncoding Video for the Web  - Webinar from ReelSEO.com
Encoding Video for the Web - Webinar from ReelSEO.com
 
Blu-Ray Final2
Blu-Ray   Final2Blu-Ray   Final2
Blu-Ray Final2
 

Dernier

一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证wpkuukw
 
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证eqaqen
 
poliovirus-190801072449. pptx
poliovirus-190801072449.            pptxpoliovirus-190801072449.            pptx
poliovirus-190801072449. pptxssuser0ad194
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...RitikaRoy32
 
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime PondicherryPondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherrymeghakumariji156
 
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Nitya salvi
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样awasv46j
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxbingyichin04
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfamanda2495
 
BLOCK CHAIN PROJECT block chain project
BLOCK CHAIN  PROJECT block chain projectBLOCK CHAIN  PROJECT block chain project
BLOCK CHAIN PROJECT block chain projectujraj8767
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahimamgadibrahim92
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Websitemark11275
 
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789CristineGraceAcuyan
 
Eye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docxEye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docxMdBokhtiyarHossainNi
 
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKLANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKMarekMitek1
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样yhavx
 
The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024Ilham Brata
 
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best ServiceHigh Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Simple Conference Style Presentation by Slidesgo.pptx
Simple Conference Style Presentation by Slidesgo.pptxSimple Conference Style Presentation by Slidesgo.pptx
Simple Conference Style Presentation by Slidesgo.pptxbalqisyamutia
 

Dernier (20)

一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
 
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
 
poliovirus-190801072449. pptx
poliovirus-190801072449.            pptxpoliovirus-190801072449.            pptx
poliovirus-190801072449. pptx
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime PondicherryPondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
 
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptx
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
 
BLOCK CHAIN PROJECT block chain project
BLOCK CHAIN  PROJECT block chain projectBLOCK CHAIN  PROJECT block chain project
BLOCK CHAIN PROJECT block chain project
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
 
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
 
Eye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docxEye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docx
 
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKLANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
 
The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024
 
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best ServiceHigh Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
 
Simple Conference Style Presentation by Slidesgo.pptx
Simple Conference Style Presentation by Slidesgo.pptxSimple Conference Style Presentation by Slidesgo.pptx
Simple Conference Style Presentation by Slidesgo.pptx
 

Image Optimization for The Web

  • 1. Image optimization For the Web Guilherme Zühlke O’Connor http://www.z-oc.com
  • 2. Optimise what? • Data transfer (file size) • HTTP requests • File maintenance • File References in Code
  • 3. File size • Colour system • Number of colours effectively used • Image format • Image size
  • 4. File Size by Save As - PNG - 8247 bytes (8Kb) Palette Save for Web - PNG 24 - 5471 bytes (5Kb) (png) Save for Web - PNG 8 - 128c - 4478 bytes (4Kb) 500x20px Save for Web - PNG 8 - 20c - 1259 bytes (1.2Kb) Gradient Save for Web - PNG 8 - 16c - 716 bytes Save for Web - PNG 8 - 8c - 507 bytes
  • 5. File Size by Palette (gif) Save for Web - GIF - 128c - 5260 bytes (5Kb) 500x20px Save for Web - GIF - 20c - 1772 bytes (1.7Kb) Gradient Save for Web - GIF - 16c - 1071 bytes Save for Web - GIF - 8c - 765 bytes
  • 6. File Size by Save As - JPG - Q10/12 - 20686 bytes (20Kb) compression Save for Web - JPG - 100% - 2016 bytes (2Kb) (jpg) Save for Web - JPG - 60% - 732 bytes 500x20px Save for Web - JPG - 30% - 571 bytes Gradient Save for Web - JPG - 5% - 490 bytes
  • 7. Jpeg format • RGB or Grayscale • There is no lossless Jpeg • Good for gradients and loose edges • Poor for simple images • No precise control over the colour palette • Sacrifices chrominance, optim. luminance
  • 8. Save for Web Save for Web Save for Web Jpeg 15% PNG8 - 8c Jpeg - 15% 200x300px 100x160px 100x160px 2121 bytes 997 bytes 5577 bytes http://flickr.com/photos/annazuhlke/3254769257/ Jpeg Vs. Png
  • 9. PNG format • 24 or up to 8 bits (RGB, GS or Indexed) • Lossless compression • Colorspace Reduction != Compression • Poor compression for complex gradient patterns • Alpha or 1-bit transparency (Probs in IE)
  • 10. Save for Web Save for Web Save for Web PNG 8 - 128c JPEG - 30% PNG 24 200x300px 200x300px 200x300px 22,170 bytes 7,869 bytes 95,130 bytes http://flickr.com/photos/annazuhlke/3252543983/ Photo rendering
  • 11. GIF format • Up to 8 bits, indexed colour (up to 256c) • Lossless compression • 1 bit transparency • Generally poorer compression than PNG
  • 12. Save for Web Save for Web PNG 8 - 128c GIF - 128c 200x300px 200x300px 22,170 bytes 28,930 bytes http://flickr.com/photos/annazuhlke/3252543983/ Photo rendering
  • 13. Colour Sytems • RGB • Grayscale • Indexed Colour
  • 14. RGB • Each pixel is represented by 24 bits • Three channels (R,G & B) • 8 bits each
  • 15. Grayscale • Each shade of gray is represented by 8 bits • 256 shades of gray overal • 1/3 of the basic file size for a non-colour image, compared to RGB
  • 16. Indexed Colour • Each pixel is represented by up to 8 bits • A colour palette is created • Each colour in the palette is referenced by the (up to) 8 bits number
  • 17. Cool! Can I create my colour palettes in photoshop beforehand so I have precise colours?
  • 19. Image Sizes Size of compressed image files don’t increase linearly to the number of pixels
  • 20. File Size by Save for Web - 500x20px - 507 bytes pixel qty Save for Web - 300x20px - 392 bytes (png) Save for Web - 100x20px - 248 bytes PNG-8 Save for Web - 10x20px - 190 bytes 8 colours Save for Web - 1x20px - 162 bytes
  • 21. The less the merrier? Consider the rendering effort of tiling the image on the browser.
  • 22. Sprites Multiple page assets in a single image
  • 23. Having a single file... • It’s easier to maintain the image • It’s easier to deploy • Only one HTTP request • File size growth is sublinear on number of pixels and colours
  • 24. Save for Web - 8c -100x20px - 248 bytes Arithmetic 248 x 4 x 4 = 449? Save for Web - 32c -100x80px - 449 bytes
  • 25. More assets Save for Web - 48c 100x160px The beauty of 837 bytes sublinear increment! Save for Web - 48c 100x240px 899 bytes
  • 26. If you maintain the files, you know... • Nothing is more boring and inefficient than saving, exporting maintaining and organizing a lot of files • You’ll have better use for your time and attention polishing and optimizing one file, rather than several
  • 28. Last but not least: (automate it)
  • 30. Smush.It • Lossless and extreme optimization • Quick and Simple • Be aware of confidentiality issues processing images on a site external to the company.