Image optimization pipeline

SergeyChernyshev
BEFORE     AFTER




IMAGE OPTIMIZATION PIPELINE
SERGEY CHERNYSHEV

       • Work   at truTV/Turner

       • Organize   NY Meetup

       • Developed     ShowSlow and a few
        other tools

        


       @SergeyChe, @PerfPlanet
WHY FASTER?




http://blog.kissmetrics.com/loading-time/
websiteoptimization.com
WHY IMAGES?
• Largest   Payload (63%)

• Grew      21% in size in 2011

• Main   connection blocker

• The   visual indicator
            598K
• We    will only get more of them
AUTOMATE
• Extra
      step in photo
 editor's workflow

• Not obvious to
 photo editors, they
 shouldn't care

• User Generated
 Content can't be
 manually processed
WHERE TO AUTOMATE?
• PhotoShop   scripting

• CMS    hooks

• Version   control commit hooks

• Application     logic (especially for UGC)

• File   system monitors
SMUSHING
                (lossless compression)

• Removes    meta-data

• Preserves      quality

• Saves   more then you think!

• Kudos   to Stoyan & Nicole       META-DATA
LOSSY COMPRESSION
       Increase compression until
       quality visibly degrades

 100%      90%    80%    70%        60%




 50%       40%    30%    20%        10%
LOSSY COMPRESSION
    But it heavily depends on
     size and content of an image

 100%    90%     80%    70%     60%




 50%     40%     30%    20%     10%
LOSSY COMPRESSION
  AUTOMATION
           ImgMin
CSS SPRITES
• Games    are cool!

• Reduces   latency cost

• SpriteMe.org

• Don't   overdo it

• We   need automation for this!
RESIZE TO SIZE
                Responsive Design




http://blog.braintraffic.com/2012/01/content-strategy-and-responsive-design/
RESIZE TO SIZE
                                    Preserving Proportions

• Thumbnails!

• Never    resize in the browser

• Createa map of sizes for each
 image type
                        Changing Proportions

• Changing   proportions is hard

• Do   not resize on the fly
LOAD LATER
LOAD LATER
LOAD LATER
<SPAN
      CLASS="POSTLOAD"
      DATA-URL="/AWESOME.JPG"
      DATA-ALT="AWESOME PIC"
></SPAN>

<IMG
        SRC="/AWESOME.JPG"
        ALT="AWESOME PIC"
/>
REWRITE URLS
<IMG
              SRC="<?=U('/AWESOME.JPG') ?>"
              ALT="AWESOME PIC"
/>
• Enabling/disabling   and   • Caching    forever
 moving CDNs
 (including SSL)
            • Data   URIs?
• Domain   sharding

• Different
      setups in
 DEV/QA/PROD
CACHE FOREVER
"POINTLESS 304S"
CACHE FOREVER
Far-future Expires and Cache-Control headers
CACHE FOREVER
 Far-future Expires and Cache-Control headers




                       




Finger-print the URL with hash of the content
Image optimization pipeline
THANK YOU!


@SergeyChe


@PerfPlanet


Sergey.Chernyshev@turner.com
1 of 23

Recommended

Capturing speed of user experience using user timing api by
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 apiSergeyChernyshev
671 views30 slides
Managing application performance by Kwame Thomison by
Managing application performance by Kwame ThomisonManaging application performance by Kwame Thomison
Managing application performance by Kwame ThomisonSergeyChernyshev
276 views64 slides
Fastest request is never made by
Fastest request is never madeFastest request is never made
Fastest request is never madeSergeyChernyshev
249 views20 slides
Designing speed with progressive enhancement by
Designing speed with progressive enhancementDesigning speed with progressive enhancement
Designing speed with progressive enhancementSergeyChernyshev
931 views43 slides
Web performance tools @ WebPerf.camp 2016 by
Web performance tools @ WebPerf.camp 2016Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016SergeyChernyshev
771 views17 slides

More Related Content

More from SergeyChernyshev

Tools of the trade 2014 by
Tools of the trade 2014Tools of the trade 2014
Tools of the trade 2014SergeyChernyshev
2K views17 slides
What we can learn from CDNs about Web Development, Deployment, and Performance by
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 PerformanceSergeyChernyshev
2.8K views60 slides
Scalability vs. Performance by
Scalability vs. PerformanceScalability vs. Performance
Scalability vs. PerformanceSergeyChernyshev
3.5K views17 slides
Web performance: beyond load testing by
Web performance: beyond load testingWeb performance: beyond load testing
Web performance: beyond load testingSergeyChernyshev
1.6K views18 slides
Introduction to web performance @ IEEE by
Introduction to web performance @ IEEEIntroduction to web performance @ IEEE
Introduction to web performance @ IEEESergeyChernyshev
1.3K views14 slides
Introduction to Web Performance by
Introduction to Web PerformanceIntroduction to Web Performance
Introduction to Web PerformanceSergeyChernyshev
893 views14 slides

More from SergeyChernyshev(20)

What we can learn from CDNs about Web Development, Deployment, and Performance by SergeyChernyshev
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
SergeyChernyshev2.8K views
Web performance: beyond load testing by SergeyChernyshev
Web performance: beyond load testingWeb performance: beyond load testing
Web performance: beyond load testing
SergeyChernyshev1.6K views
Introduction to web performance @ IEEE by SergeyChernyshev
Introduction to web performance @ IEEEIntroduction to web performance @ IEEE
Introduction to web performance @ IEEE
SergeyChernyshev1.3K views
Performance anti patterns in ajax applications by SergeyChernyshev
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applications
SergeyChernyshev1.2K views
Keeping track of your performance using Show Slow by SergeyChernyshev
Keeping track of your performance using Show SlowKeeping track of your performance using Show Slow
Keeping track of your performance using Show Slow
SergeyChernyshev1.8K views
Keeping track of your performance using show slow by SergeyChernyshev
Keeping track of your performance using show slowKeeping track of your performance using show slow
Keeping track of your performance using show slow
SergeyChernyshev632 views
Building your own CDN using Amazon EC2 by SergeyChernyshev
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2
SergeyChernyshev34.4K views
Open Source Hardware (adolescence) by SergeyChernyshev
Open Source Hardware (adolescence)Open Source Hardware (adolescence)
Open Source Hardware (adolescence)
SergeyChernyshev1.6K views
Semantic Media Wiki & Semantic Forms by SergeyChernyshev
Semantic Media Wiki & Semantic FormsSemantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic Forms
SergeyChernyshev7.1K views
Behind the Scenes at LiveJournal: Scaling Storytime by SergeyChernyshev
Behind the Scenes at LiveJournal: Scaling StorytimeBehind the Scenes at LiveJournal: Scaling Storytime
Behind the Scenes at LiveJournal: Scaling Storytime
SergeyChernyshev10.2K views

Recently uploaded

Business Analyst Series 2023 - Week 4 Session 7 by
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
152 views31 slides
AI + Memoori = AIM by
AI + Memoori = AIMAI + Memoori = AIM
AI + Memoori = AIMMemoori
15 views9 slides
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... by
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...BookNet Canada
43 views16 slides
Innovation & Entrepreneurship strategies in Dairy Industry by
Innovation & Entrepreneurship strategies in Dairy IndustryInnovation & Entrepreneurship strategies in Dairy Industry
Innovation & Entrepreneurship strategies in Dairy IndustryPervaizDar1
39 views26 slides
Deep Tech and the Amplified Organisation: Core Concepts by
Deep Tech and the Amplified Organisation: Core ConceptsDeep Tech and the Amplified Organisation: Core Concepts
Deep Tech and the Amplified Organisation: Core ConceptsHolonomics
17 views21 slides
Inawisdom IDP by
Inawisdom IDPInawisdom IDP
Inawisdom IDPPhilipBasford
17 views48 slides

Recently uploaded(20)

Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10152 views
AI + Memoori = AIM by Memoori
AI + Memoori = AIMAI + Memoori = AIM
AI + Memoori = AIM
Memoori15 views
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... by BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada43 views
Innovation & Entrepreneurship strategies in Dairy Industry by PervaizDar1
Innovation & Entrepreneurship strategies in Dairy IndustryInnovation & Entrepreneurship strategies in Dairy Industry
Innovation & Entrepreneurship strategies in Dairy Industry
PervaizDar139 views
Deep Tech and the Amplified Organisation: Core Concepts by Holonomics
Deep Tech and the Amplified Organisation: Core ConceptsDeep Tech and the Amplified Organisation: Core Concepts
Deep Tech and the Amplified Organisation: Core Concepts
Holonomics17 views
GDSC GLAU Info Session.pptx by gauriverrma4
GDSC GLAU Info Session.pptxGDSC GLAU Info Session.pptx
GDSC GLAU Info Session.pptx
gauriverrma415 views
Measurecamp Brussels - Synthetic data.pdf by Human37
Measurecamp Brussels - Synthetic data.pdfMeasurecamp Brussels - Synthetic data.pdf
Measurecamp Brussels - Synthetic data.pdf
Human37 27 views
This talk was not generated with ChatGPT: how AI is changing science by Elena Simperl
This talk was not generated with ChatGPT: how AI is changing scienceThis talk was not generated with ChatGPT: how AI is changing science
This talk was not generated with ChatGPT: how AI is changing science
Elena Simperl34 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li104 views
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada46 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays59 views
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf by MichaelOLeary82
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdfAdopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
MichaelOLeary8213 views
Discover Aura Workshop (12.5.23).pdf by Neo4j
Discover Aura Workshop (12.5.23).pdfDiscover Aura Workshop (12.5.23).pdf
Discover Aura Workshop (12.5.23).pdf
Neo4j20 views
Mobile Core Solutions & Successful Cases.pdf by IPLOOK Networks
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdf
IPLOOK Networks16 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty66 views
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」 by PC Cluster Consortium
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...

Image optimization pipeline