SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
Fast & Responsive 
Images 
O'Reilly Velocity NY September 17, 2014
Sergey Chernyshev 
Organize NY Web Perf 
Tech. Dir. Web Sys. & 
App. Dev. at truTV / 
Turner 
@SergeyChe 
SergeyChernyshev.com
Responsive Design & Images 
May 25, 2010 http://alistapart.com/article/responsive-web-design/
Image Responsiveness 
Size 
"Art direction" 
Format / Encoding 
Bandwidth
Size in Pixels (resolution) 
Size in Kb 
on the wire 
in memory 
+ decoding 
1920px 320px 
"Why we need responsive images" 
part I & part II by @TKadlec
Size in Pixels (density) 
Multiply by 1 - 3x 
Kindle Fire HDX - 2560x1600 
iPhone 6 - 1704x960 
iPhone 5 - 1136x640 
iPad 3, 4, Air - 2048x1536 
MacBook Pro Retina - 2880x1800 
http://dpi.lv/ - DPI Love by Lea Verou
Art Direction
Encoding: JPEG compression 
100% 90% 80% 70% 60% 
50% 40% 30% 20% 10% 
100% 90% 80% 70% 60% 
50% 40% 30% 20% 10% 
Lossy: 1-100 quality setting 
Lossless: removes metadata
Encoding: Best Format 
JPEG 
WebP 
Chrome23+ 
Opera 12.1+ 
JPEG XR 
IE10+ 
PNG 
Gif -> PNG 
PNG -> JPEG 
SVG 
Web Site Optimization With Browser-Specific 
Image Formats calendar.perfplanet.com
Bandwidth 
Vary compression level 
Requires bandwidth detection 
Just plain hard 
Alternative: use progressive JPEG 
Progressive JPEGs FTW! 
by @PatMeenan
Integration: CMS Workflow 
Edit 
Optimize 
Deploy
Integration: Image Service 
Adaptive Images 
https://github.com/MattWilcox/Adaptive-Images 
SenchaSRC, LiquidPixels 
<img 
src="http://src.sencha.io/320/200/http://a.com/b.jpg" 
width="320" 
height="200" 
>
<picture>, srcset, sizes 
Now part of HTML spec 
In upcoming Chrome, Firefox and Opera, "under 
consideration" in IE
On The Page 
<?php img('/path/to/original.jpg') ?> 
Picturefill v2 by Scott Jehl 
https://github.com/scottjehl/picturefill 
8 Guidelines and 1 Rule for Responsive Images 
http://blog.cloudfour.com/8-guidelines-and-1-rule-for-responsive-images/
Integration: Automation 
mod_pagespeed / ngx_pagespeed filters 
• rewrite_images 
• inline_images 
• recompress_images 
• convert_gif_to_png, convert_png_to_jpeg 
FEO from Akamai, Radware and others
Homepage Image Sizes (Mb) 
1.600 
1.200 
0.800 
0.400 
0.000 
1.454 
1.233 
0.407 
Small Medium Large
Homepage Image Sizes (Mb) 
4.000 
3.000 
2.000 
1.000 
0.000 
3.818 
1.233 1.454 
0.407 
Small Medium Large Source
Thank you! 
Sergey Chernyshev 
! 
@SergeyChe 
! 
@PerfPlanet 
! 
sergey.chernyshev@gmail.com

Mais conteúdo relacionado

Mais de SergeyChernyshev

Mais de SergeyChernyshev (20)

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing api
 
Managing application performance by Kwame Thomison
Managing application performance by Kwame ThomisonManaging application performance by Kwame Thomison
Managing application performance by Kwame Thomison
 
Fastest request is never made
Fastest request is never madeFastest request is never made
Fastest request is never made
 
Designing speed with progressive enhancement
Designing speed with progressive enhancementDesigning speed with progressive enhancement
Designing speed with progressive enhancement
 
Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016
 
Extending your applications to the edge with CDNs
Extending your applications to the edge with CDNsExtending your applications to the edge with CDNs
Extending your applications to the edge with CDNs
 
Speed is feature #1
Speed is feature #1Speed is feature #1
Speed is feature #1
 
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and Performance
 
Introduction to Web Performance
Introduction to Web PerformanceIntroduction to Web Performance
Introduction to Web Performance
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applications
 
Keeping track of your performance using Show Slow
Keeping track of your performance using Show SlowKeeping track of your performance using Show Slow
Keeping track of your performance using Show Slow
 
Keeping track of your performance using show slow
Keeping track of your performance using show slowKeeping track of your performance using show slow
Keeping track of your performance using show slow
 
In Search of Speed
In Search of SpeedIn Search of Speed
In Search of Speed
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2
 
Php Code Profiling Using X Debug
Php Code Profiling Using X DebugPhp Code Profiling Using X Debug
Php Code Profiling Using X Debug
 
Why RDFa?
Why RDFa?Why RDFa?
Why RDFa?
 
Introduction to RDFa
Introduction to RDFaIntroduction to RDFa
Introduction to RDFa
 
Open Source Hardware: A Start...
Open Source Hardware: A Start...Open Source Hardware: A Start...
Open Source Hardware: A Start...
 
Open Source Hardware (adolescence)
Open Source Hardware (adolescence)Open Source Hardware (adolescence)
Open Source Hardware (adolescence)
 
Semantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic FormsSemantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic Forms
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

Fast and responsive images (velocity)

  • 1. Fast & Responsive Images O'Reilly Velocity NY September 17, 2014
  • 2. Sergey Chernyshev Organize NY Web Perf Tech. Dir. Web Sys. & App. Dev. at truTV / Turner @SergeyChe SergeyChernyshev.com
  • 3. Responsive Design & Images May 25, 2010 http://alistapart.com/article/responsive-web-design/
  • 4. Image Responsiveness Size "Art direction" Format / Encoding Bandwidth
  • 5. Size in Pixels (resolution) Size in Kb on the wire in memory + decoding 1920px 320px "Why we need responsive images" part I & part II by @TKadlec
  • 6. Size in Pixels (density) Multiply by 1 - 3x Kindle Fire HDX - 2560x1600 iPhone 6 - 1704x960 iPhone 5 - 1136x640 iPad 3, 4, Air - 2048x1536 MacBook Pro Retina - 2880x1800 http://dpi.lv/ - DPI Love by Lea Verou
  • 8. Encoding: JPEG compression 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% Lossy: 1-100 quality setting Lossless: removes metadata
  • 9. Encoding: Best Format JPEG WebP Chrome23+ Opera 12.1+ JPEG XR IE10+ PNG Gif -> PNG PNG -> JPEG SVG Web Site Optimization With Browser-Specific Image Formats calendar.perfplanet.com
  • 10. Bandwidth Vary compression level Requires bandwidth detection Just plain hard Alternative: use progressive JPEG Progressive JPEGs FTW! by @PatMeenan
  • 11. Integration: CMS Workflow Edit Optimize Deploy
  • 12. Integration: Image Service Adaptive Images https://github.com/MattWilcox/Adaptive-Images SenchaSRC, LiquidPixels <img src="http://src.sencha.io/320/200/http://a.com/b.jpg" width="320" height="200" >
  • 13. <picture>, srcset, sizes Now part of HTML spec In upcoming Chrome, Firefox and Opera, "under consideration" in IE
  • 14. On The Page <?php img('/path/to/original.jpg') ?> Picturefill v2 by Scott Jehl https://github.com/scottjehl/picturefill 8 Guidelines and 1 Rule for Responsive Images http://blog.cloudfour.com/8-guidelines-and-1-rule-for-responsive-images/
  • 15. Integration: Automation mod_pagespeed / ngx_pagespeed filters • rewrite_images • inline_images • recompress_images • convert_gif_to_png, convert_png_to_jpeg FEO from Akamai, Radware and others
  • 16. Homepage Image Sizes (Mb) 1.600 1.200 0.800 0.400 0.000 1.454 1.233 0.407 Small Medium Large
  • 17. Homepage Image Sizes (Mb) 4.000 3.000 2.000 1.000 0.000 3.818 1.233 1.454 0.407 Small Medium Large Source
  • 18. Thank you! Sergey Chernyshev ! @SergeyChe ! @PerfPlanet ! sergey.chernyshev@gmail.com