SlideShare a Scribd company logo
1 of 12
Preparing Images
                 for the Web


Advanced CSS                      Stephen Ireland
Image Optimization

    Why do I need to know about this?

    Because it can affect;

• Download speeds (don’t forget dial-up or mobile users)
• Quality (you want your images to be high quality)
• Colour (different screens, different browsers)
• Accessibility (colour blindness considerations)




Advanced CSS                                          Stephen Ireland
Considerations

    What options / tools do we have?
• Image size (physical dimensions)
• File type (GIF, JPEG or PNG - which is best?)
• Compression (size versus quality issues)
• Save for Web (option in Adobe Photoshop 6.5+)




Advanced CSS                                      Stephen Ireland
Image Size
• Web images should be measured in pixels (px)
• Adjust Photoshop: Preferences > Units & Rulers...
• Resolution should be 72dpi (for screen use)
• Crop images to minimum physical size;




Advanced CSS                                          Stephen Ireland
File Types

    The big three:
• GIF
• JPEG
• PNG

    Each type has its uses. We need to know which is best
    depending on the image and its use.




Advanced CSS                                                Stephen Ireland
GIF       (.gif)

• Best for graphic artwork
• Images made up of blocks of colour
• Text, line art, patterns etc (not gradients or photos)
• Can use lossless compression
• Can have transparent background, although not perfect




Advanced CSS                                               Stephen Ireland
JPEG           (.jpg)

• Best for images with continuous tones
• Images with subtle changes in colour
• Photographic images and gradients are ideal
• Use of ‘lossy’ compression to reduce file size
• Watch out for ‘artefacts’ when compression is high




Advanced CSS                                           Stephen Ireland
PNG            (.png)

• Good for images requiring complete transparency
• Not well supported, browser compatibility iffy
• IE can be ‘hacked’ to support transparency in PNGs
• You may find a use for PNG files but its probably worth
    finding a workaround to avoid the browser inconsistencies




Advanced CSS                                           Stephen Ireland
Optimization & Compression
• Reduce the file size,
    reduce the download time

• Use ‘Save for Web’ in
    Photoshop

• Learn the keyboard
    shortcut!

• Each option is a
    compromise between
    reproduction quality and
    download time

Advanced CSS                   Stephen Ireland
Photoshop: Save for Web
• Choose from the presets
• Compare quality against file size
• Override preset if necessary




Advanced CSS                          Stephen Ireland
Save for Web: Typical Presets

    JPEG images
• Try not to go below 60% quality - artefacts obvious,
    reduce physical size of image instead
• Don’t save image with ICC profile - this will cause colour
    match problems in Safari on the Mac

    GIF images
• Try 64 or 128bit Dithered - This should work fine
• Using transparency? - test on background and edit pixel
    edges manually if necessary!

Advanced CSS                                          Stephen Ireland
Final Notes
• Remember; compression is a compromise between file size
    and download time. Not everyone has fast internet access.

• Cut out wasted pixels from your images, this will reduce
    your file size, and therefore download time.

• Consider the colours used in your images carefully, check
    they won’t cause problems for those with colour blindness.

• http://www.websiteoptimization.com/ offers free speed
    tests. Part of these tests will tell you how long your images
    will take to download.


Advanced CSS                                              Stephen Ireland

More Related Content

What's hot

Wordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytianWordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytianGrant Merriel
 
Sustainable UX For Everyone
Sustainable UX For EveryoneSustainable UX For Everyone
Sustainable UX For EveryoneMobileUXLondon
 
Selecting a WordPress theme
Selecting a WordPress themeSelecting a WordPress theme
Selecting a WordPress themeWarren Denley
 
Word Press Intro for Beginners
Word Press Intro for BeginnersWord Press Intro for Beginners
Word Press Intro for BeginnersSueEllisSaller
 
Ican cms training (editing images)
Ican cms training (editing images) Ican cms training (editing images)
Ican cms training (editing images) hassandabbagh
 
Deliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeDeliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeFITC
 
Creative Video Wall Processing
Creative Video Wall ProcessingCreative Video Wall Processing
Creative Video Wall ProcessingrAVe [PUBS]
 
Reputation management
Reputation managementReputation management
Reputation managementluckyboost
 
Understanding Content Management Services
Understanding Content Management ServicesUnderstanding Content Management Services
Understanding Content Management Services360ideas
 
How To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesHow To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesWP Engine
 
Image Optimization Techniques & Tips
Image Optimization Techniques & TipsImage Optimization Techniques & Tips
Image Optimization Techniques & TipsSvasamsoft
 
Building an Ad Server to Optimize House (Internal) Ads
Building an Ad Server to Optimize House (Internal) AdsBuilding an Ad Server to Optimize House (Internal) Ads
Building an Ad Server to Optimize House (Internal) AdsJordan Skole
 
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
Spectrum 16   pmc 16 - preparing legacy projects for responsive designSpectrum 16   pmc 16 - preparing legacy projects for responsive design
Spectrum 16 pmc 16 - preparing legacy projects for responsive designNeil Perlin
 
The high resolution web
The high resolution webThe high resolution web
The high resolution webPatric Lanhed
 
Web designing chennai
Web designing chennaiWeb designing chennai
Web designing chennaiacspvt14
 
How to use WordPress
How to use WordPressHow to use WordPress
How to use WordPressJonny Allbut
 
Web Site Hosting and Deployment
Web Site Hosting and DeploymentWeb Site Hosting and Deployment
Web Site Hosting and DeploymentSusan Sim
 

What's hot (20)

Wordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytianWordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytian
 
Sustainable UX For Everyone
Sustainable UX For EveryoneSustainable UX For Everyone
Sustainable UX For Everyone
 
Selecting a WordPress theme
Selecting a WordPress themeSelecting a WordPress theme
Selecting a WordPress theme
 
Word Press Intro for Beginners
Word Press Intro for BeginnersWord Press Intro for Beginners
Word Press Intro for Beginners
 
Ican cms training (editing images)
Ican cms training (editing images) Ican cms training (editing images)
Ican cms training (editing images)
 
Deliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeDeliver Perfect Images At Any Size
Deliver Perfect Images At Any Size
 
Creative Video Wall Processing
Creative Video Wall ProcessingCreative Video Wall Processing
Creative Video Wall Processing
 
Reputation management
Reputation managementReputation management
Reputation management
 
Understanding Content Management Services
Understanding Content Management ServicesUnderstanding Content Management Services
Understanding Content Management Services
 
How To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesHow To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter Templates
 
Image Optimization Techniques & Tips
Image Optimization Techniques & TipsImage Optimization Techniques & Tips
Image Optimization Techniques & Tips
 
Word press in 60 minutes
Word press in 60 minutesWord press in 60 minutes
Word press in 60 minutes
 
Building an Ad Server to Optimize House (Internal) Ads
Building an Ad Server to Optimize House (Internal) AdsBuilding an Ad Server to Optimize House (Internal) Ads
Building an Ad Server to Optimize House (Internal) Ads
 
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
Spectrum 16   pmc 16 - preparing legacy projects for responsive designSpectrum 16   pmc 16 - preparing legacy projects for responsive design
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
 
The high resolution web
The high resolution webThe high resolution web
The high resolution web
 
Basic web Deveopment
Basic web DeveopmentBasic web Deveopment
Basic web Deveopment
 
Web designing chennai
Web designing chennaiWeb designing chennai
Web designing chennai
 
How to use WordPress
How to use WordPressHow to use WordPress
How to use WordPress
 
Web design
Web designWeb design
Web design
 
Web Site Hosting and Deployment
Web Site Hosting and DeploymentWeb Site Hosting and Deployment
Web Site Hosting and Deployment
 

Similar to Preparing Images for the Web: Image Optimization Tips

Image optimization and you
Image optimization and youImage optimization and you
Image optimization and youJohannes Siipola
 
A Picture Costs A Thousand Words
A Picture Costs A Thousand WordsA Picture Costs A Thousand Words
A Picture Costs A Thousand WordsGuy Podjarny
 
Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)Guy Podjarny
 
Web graphics vector & roaster101
Web graphics  vector & roaster101Web graphics  vector & roaster101
Web graphics vector & roaster101nageswaran987
 
We should optimize images
We should optimize imagesWe should optimize images
We should optimize imagesShogo Sensui
 
Velocity Conference 2013: A Picture Costs A Thousand Words
Velocity Conference 2013: A Picture Costs A Thousand WordsVelocity Conference 2013: A Picture Costs A Thousand Words
Velocity Conference 2013: A Picture Costs A Thousand WordsAkamai Technologies
 
Castro Chapter 5
Castro Chapter 5Castro Chapter 5
Castro Chapter 5Jeff Byrnes
 
File types pro forma
File types pro formaFile types pro forma
File types pro formaCam Stannard
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web ImagesSteve Guinan
 
High Performance Images in WordPress
High Performance Images in WordPressHigh Performance Images in WordPress
High Performance Images in WordPresskeithdevon
 
Image optimization q_auto - f_auto
Image optimization q_auto - f_autoImage optimization q_auto - f_auto
Image optimization q_auto - f_autoCan Ozdoruk
 
Digital Graphics Pro Forma
Digital Graphics Pro FormaDigital Graphics Pro Forma
Digital Graphics Pro FormaAlex Walker
 
File types pro forma
File types pro forma File types pro forma
File types pro forma Alex Walker
 
File types pro forma
File types pro formaFile types pro forma
File types pro formaCheekiBreeki
 
Trouble with distribution
Trouble with distributionTrouble with distribution
Trouble with distributionJ On The Beach
 

Similar to Preparing Images for the Web: Image Optimization Tips (20)

Image optimization and you
Image optimization and youImage optimization and you
Image optimization and you
 
Image Optimization for The Web
Image Optimization for The WebImage Optimization for The Web
Image Optimization for The Web
 
A Picture Costs A Thousand Words
A Picture Costs A Thousand WordsA Picture Costs A Thousand Words
A Picture Costs A Thousand Words
 
Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)
 
Web graphics vector & roaster101
Web graphics  vector & roaster101Web graphics  vector & roaster101
Web graphics vector & roaster101
 
We should optimize images
We should optimize imagesWe should optimize images
We should optimize images
 
Velocity Conference 2013: A Picture Costs A Thousand Words
Velocity Conference 2013: A Picture Costs A Thousand WordsVelocity Conference 2013: A Picture Costs A Thousand Words
Velocity Conference 2013: A Picture Costs A Thousand Words
 
Castro Chapter 5
Castro Chapter 5Castro Chapter 5
Castro Chapter 5
 
File types pro forma
File types pro formaFile types pro forma
File types pro forma
 
Vste r2
Vste r2Vste r2
Vste r2
 
Image Optimization
Image OptimizationImage Optimization
Image Optimization
 
P1.1
P1.1P1.1
P1.1
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
 
High Performance Images in WordPress
High Performance Images in WordPressHigh Performance Images in WordPress
High Performance Images in WordPress
 
Image optimization q_auto - f_auto
Image optimization q_auto - f_autoImage optimization q_auto - f_auto
Image optimization q_auto - f_auto
 
Digital Graphics Pro Forma
Digital Graphics Pro FormaDigital Graphics Pro Forma
Digital Graphics Pro Forma
 
File types pro forma
File types pro forma File types pro forma
File types pro forma
 
File types pro forma
File types pro formaFile types pro forma
File types pro forma
 
Image processing
Image processingImage processing
Image processing
 
Trouble with distribution
Trouble with distributionTrouble with distribution
Trouble with distribution
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Preparing Images for the Web: Image Optimization Tips

  • 1. Preparing Images for the Web Advanced CSS Stephen Ireland
  • 2. Image Optimization Why do I need to know about this? Because it can affect; • Download speeds (don’t forget dial-up or mobile users) • Quality (you want your images to be high quality) • Colour (different screens, different browsers) • Accessibility (colour blindness considerations) Advanced CSS Stephen Ireland
  • 3. Considerations What options / tools do we have? • Image size (physical dimensions) • File type (GIF, JPEG or PNG - which is best?) • Compression (size versus quality issues) • Save for Web (option in Adobe Photoshop 6.5+) Advanced CSS Stephen Ireland
  • 4. Image Size • Web images should be measured in pixels (px) • Adjust Photoshop: Preferences > Units & Rulers... • Resolution should be 72dpi (for screen use) • Crop images to minimum physical size; Advanced CSS Stephen Ireland
  • 5. File Types The big three: • GIF • JPEG • PNG Each type has its uses. We need to know which is best depending on the image and its use. Advanced CSS Stephen Ireland
  • 6. GIF (.gif) • Best for graphic artwork • Images made up of blocks of colour • Text, line art, patterns etc (not gradients or photos) • Can use lossless compression • Can have transparent background, although not perfect Advanced CSS Stephen Ireland
  • 7. JPEG (.jpg) • Best for images with continuous tones • Images with subtle changes in colour • Photographic images and gradients are ideal • Use of ‘lossy’ compression to reduce file size • Watch out for ‘artefacts’ when compression is high Advanced CSS Stephen Ireland
  • 8. PNG (.png) • Good for images requiring complete transparency • Not well supported, browser compatibility iffy • IE can be ‘hacked’ to support transparency in PNGs • You may find a use for PNG files but its probably worth finding a workaround to avoid the browser inconsistencies Advanced CSS Stephen Ireland
  • 9. Optimization & Compression • Reduce the file size, reduce the download time • Use ‘Save for Web’ in Photoshop • Learn the keyboard shortcut! • Each option is a compromise between reproduction quality and download time Advanced CSS Stephen Ireland
  • 10. Photoshop: Save for Web • Choose from the presets • Compare quality against file size • Override preset if necessary Advanced CSS Stephen Ireland
  • 11. Save for Web: Typical Presets JPEG images • Try not to go below 60% quality - artefacts obvious, reduce physical size of image instead • Don’t save image with ICC profile - this will cause colour match problems in Safari on the Mac GIF images • Try 64 or 128bit Dithered - This should work fine • Using transparency? - test on background and edit pixel edges manually if necessary! Advanced CSS Stephen Ireland
  • 12. Final Notes • Remember; compression is a compromise between file size and download time. Not everyone has fast internet access. • Cut out wasted pixels from your images, this will reduce your file size, and therefore download time. • Consider the colours used in your images carefully, check they won’t cause problems for those with colour blindness. • http://www.websiteoptimization.com/ offers free speed tests. Part of these tests will tell you how long your images will take to download. Advanced CSS Stephen Ireland