SlideShare a Scribd company logo
1 of 174
Download to read offline
Beyond Resizing
The Image Performance Checklist
Kitt Hodsden

2
!
3
"
4
💡
5
🏢
Front End Engineer
6
Back End Engineer
7
Dev Ops
Infrastructure Engineer
System Administrator
8
9
10
🖼
11
☕
12
⁉
“Already resizing, what’s next?"
13
“Have I done enough?”
14
Our Goals
15
Deliver less.
16
Deliver less.
Deliver faster.
17
Deliver less.
Deliver faster.
Render faster.
18
Be like AMP.
-ish
19
20
21
22
Deliver less.
Deliver faster.
Render faster.
Be like AMP*.
* In this way, inspired by the goals of AMP (and this way only), be like AMP.
23
24
Define “less”
25
Define “faster”
26
27
28
"
29
30
31
Test all major parts
32
Use older, slower settings
33
Run tests multiple times
34
Automate performance testing
35
The Basics
36
Resize Images
37
38
39
🤔
Website tools
Photoshop
Local script
Production process
40
Website tools
Photoshop
Local script
Production process
41
Choose the right format!
42
43
44
45
WEBP or JPEG
SVG
SVG, MP4, or
WEBM
Everything else Use PNG
46
🤔
HEIF
47
48
PNG
49
GIF
50
Animated GIF MP4
51
Sprites!
52
Sprites! ✨
53
Optimize
54
Website tools
ImageOptim
Local script
Production process
55
JPEG encoders
Modern ones, that is.
56
MozJPEG
57
Guetzli
https://github.com/google/guetzli/
58
$ guetzli --quality 84 o3200.jpg n3200.jpg
59
60
800 x 160 JPG 65kB
800 x 160 JPG guetzli 33kB
800 x 160 WEBP 41kB
PJPG
Progressive JPG
61
http://www.bookofspeed.com/chapter5.html
62
http://www.bookofspeed.com/chapter5.html
63
64
65
800 x 160 JPG 65kB
800 x 160 JPG guetzli 33kB
800 x 160 JPG guetzli progressive 42kB
Deliver less.
Deliver faster.
66
Deliver less.
Deliver faster.
Render faster.
67
<img src="a.png" height="60" width="100" />
<img src="a.png" style="height:60px; width:
100px;” />
68
Use HTML5 tags
69
70
<img src="aa.png"
srcset="ab.png 100w, ac.png 500w,
ad.png 1000w"
sizes="(min-width: 900px) 1000px,
(max-width: 900px) and (min-width: 400px) 50em,
(not (orientation: portrait)) 300px,
((orientation: landscape) or (min-width: 1000px)) 50vw,
100vw">
71
🤔
https://github.com/ausi/respimagelint
72
73
don’t scale images
(if you can avoid it)
74
The smallest delivery is no delivery
75
Lazy Loading
76
77
78
https://github.com/aFarkas/lazysizes
https://github.com/ApoorvSaxena/lozad.js
https://github.com/dinbror/blazy
https://github.com/malchata/yall.js
https://github.com/jasonslyvia/react-lazyload
79
80
81
82
🎉
Deliver less.
Deliver faster.
Render faster.
83
Deliver less.
Deliver faster.
Render faster.
Be like AMP.
84
Front End
85
86
Deliver less
Deliver faster
Render faster
Be Like AMP
The good parts.
87
Remove unused content
CSS, HTML, JavaScript, and images
88
display: none
89
Inline critical CSS
90
Profile third-party scripts
91
Remove duplicate functionality
92
Optimize webfonts
93
font-display: optional
94
async
95
Service workers
96
Resource Hints
97
prefetch
preload
dns-prefetch
preconnect
98
prefetch
preload
dns-prefetch
preconnect
99
<link rel="prefetch" href=“/i/o3200.jpeg">
100
prefetch
preload
dns-prefetch
preconnect
101
<link rel="dns-prefetch" href="//example.com">
102
prefetch
preload
dns-prefetch
preconnect
103
<link rel="preload" as="image" href="/i/clever-
girl.png">
104
<link rel="preload" as="font" href="//fonts/
font.woff2" type="font/woff" crossorigin />
105
<link rel="preload" as="script" href="map.js"
media="(min-width: 601px)">
106
<link rel="preload" as="image" href="map.png"
media="(max-width: 600px)">
<link rel="preload" as="script" href="map.js"
media="(min-width: 601px)">
107
prefetch
preload
dns-prefetch
preconnect
108
109
‼
110
‼
Service workers
111
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open('caching-v1').then(function(cache) {
return cache.addAll([
'/',
‘/styles/all.min.css’,
'/styles/imgs/needful.png',
‘/scripts/all.min.js'
]);
})
)
});
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request).then(function(cachedResponse) {
return cachedResponse || fetch(event.request);
})
);
});
112
113
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js');
});
}
114
https://github.com/Wilto/wilto-makes-food
115
116
🤔
“80-90% of the end-user
response time is spent on the
front-end, start there.”
Steve Souders Performance Golden Rule
117
“80-90% of the end-user
response time is spent on the
front-end, start there.”
Steve Souders Performance Golden Rule
118
Back End
119
Just deliver
120
imagecreatefromjpeg()
php
121
image = new BufferedImage(w, h, type);
Graphics2D g2d = image.createGraphics();
java
122
im = Image.open( 'image.jpg' )
im.show()
python
123
Placeholders
124
Limited access
125
Cache
126
Expires
127
logo.png
new-logo.svg
new-new-logo.svg
new-new-new-logo.svg
128
Resource Hints
129
prefetch
preload
dns-prefetch
preconnect
130
<link rel="preconnect" href="//fonts.google.com">
131
Link: <https://fonts.google.com">; rel=preconnect; crossorigin
132
prefetch
preload
dns-prefetch
preconnect
133
Be like AMP.
134
Eliminate known 404s
135
Minimize redirects
136
http://example.com ↩
https://example.com ↩
https://www.example.com ↩
http://www.example.com
137
Deliver less.
Deliver faster.
Render faster.
Be like AMP.
138
CDN
139
Dev Ops
140
Use a CDN.
141
Optimize Server Configuration
142
HTTP/2 + SSL
Compression
Cleanup
Cache
Break it
143
HTTP/2 + SSL
144
https://w3techs.com/technologies/details/ce-http2/all/all
145
Binary
146
Binary
Multiplexed
147
Binary
Multiplexed
Header compression
148
SSL
149
150
SSL
151
Compression
gzip, at a minimum
152
Static / Dynamic
153
Clean up.
154
Caching
155
Break it
156
HTTP/2 + SSL
Compression
Cleanup
Cache
Break it
157
Be Like AMP
158
CDN
159
Before and After
160
Automate it.
161
Everyone else
162
Embrace less
163
164
165
Summary
166
Deliver less.
Deliver faster.
Render faster.
Be like AMP.
167
1. Resize Images
168
2. Small Images
169
3. Resource Hints
prefetch, preload, dns-prefetch, preconnect
170
4. CDN
prefetch, preload, dns-prefetch, preconnect
171
Victoire!
172
173
🎉
Thanks!
174

More Related Content

What's hot

E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
PerconaPerformance
 

What's hot (20)

Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the EnterpriseBringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Optimizing your WordPress website
Optimizing your WordPress websiteOptimizing your WordPress website
Optimizing your WordPress website
 
Automating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server apiAutomating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server api
 
WordPress Performance 101
WordPress Performance 101WordPress Performance 101
WordPress Performance 101
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
 
How to Install Magento on Google Cloud Engine (GCE)
How to Install Magento on Google Cloud Engine (GCE)How to Install Magento on Google Cloud Engine (GCE)
How to Install Magento on Google Cloud Engine (GCE)
 
Prioritize your critical css and images to render your site fast velocity ny...
Prioritize your critical css and images to render your site fast  velocity ny...Prioritize your critical css and images to render your site fast  velocity ny...
Prioritize your critical css and images to render your site fast velocity ny...
 
Performance and optimization CakeFest 2014
Performance and optimization CakeFest 2014Performance and optimization CakeFest 2014
Performance and optimization CakeFest 2014
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
 
Asset Redux - Front end performance on Rails (Phil Nash)
Asset Redux - Front end performance on Rails (Phil Nash)Asset Redux - Front end performance on Rails (Phil Nash)
Asset Redux - Front end performance on Rails (Phil Nash)
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
DevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukamaDevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukama
 
Care and feeding notes
Care and feeding notesCare and feeding notes
Care and feeding notes
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...
 
Building Scalable Websites with Perl
Building Scalable Websites with PerlBuilding Scalable Websites with Perl
Building Scalable Websites with Perl
 
Keep the Web Fast
Keep the Web FastKeep the Web Fast
Keep the Web Fast
 

Similar to Beyond Resizing: The Image Performance Checklist

Web page load speed optimization
Web page load speed optimizationWeb page load speed optimization
Web page load speed optimization
Dmitry Dudin
 

Similar to Beyond Resizing: The Image Performance Checklist (20)

Front end performance tip
Front end performance tipFront end performance tip
Front end performance tip
 
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side Optimization
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]
 
Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]
 
AMP in WordPress, the WordPress Way
AMP in WordPress, the WordPress WayAMP in WordPress, the WordPress Way
AMP in WordPress, the WordPress Way
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
 
Oscon 20080724
Oscon 20080724Oscon 20080724
Oscon 20080724
 
Clean separation
Clean separationClean separation
Clean separation
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPress
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
 
Utbildningsradion 2011
Utbildningsradion 2011Utbildningsradion 2011
Utbildningsradion 2011
 
Web page load speed optimization
Web page load speed optimizationWeb page load speed optimization
Web page load speed optimization
 

More from Cloudinary

More from Cloudinary (15)

Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers Imagecon 2019 - Jon Sneyers
Imagecon 2019 - Jon Sneyers
 
Imagecon 2019 - Jen Looper
Imagecon 2019 - Jen LooperImagecon 2019 - Jen Looper
Imagecon 2019 - Jen Looper
 
Imagecon 2019 - Aaron Gustafson
Imagecon 2019 - Aaron GustafsonImagecon 2019 - Aaron Gustafson
Imagecon 2019 - Aaron Gustafson
 
Imagecon 2019 - Amy Balliett
Imagecon 2019 - Amy BalliettImagecon 2019 - Amy Balliett
Imagecon 2019 - Amy Balliett
 
Imagecon Itai
Imagecon ItaiImagecon Itai
Imagecon Itai
 
ImageCon CTO keynote
ImageCon CTO keynoteImageCon CTO keynote
ImageCon CTO keynote
 
ImageCon keynote product
ImageCon keynote productImageCon keynote product
ImageCon keynote product
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
Images For Everyone
Images For EveryoneImages For Everyone
Images For Everyone
 
Moving Metrics with Better Mobile Images
Moving Metrics with Better Mobile ImagesMoving Metrics with Better Mobile Images
Moving Metrics with Better Mobile Images
 
Images in the Era of the Algorithm
Images in the Era of the AlgorithmImages in the Era of the Algorithm
Images in the Era of the Algorithm
 
Media Processing Workflows using AWS Step Functions and Machine Learning on A...
Media Processing Workflows using AWS Step Functions and Machine Learning on A...Media Processing Workflows using AWS Step Functions and Machine Learning on A...
Media Processing Workflows using AWS Step Functions and Machine Learning on A...
 
The Physics of Fast Image Compression
The Physics of Fast Image CompressionThe Physics of Fast Image Compression
The Physics of Fast Image Compression
 
Delivering Responsive Images
Delivering Responsive Images Delivering Responsive Images
Delivering Responsive Images
 
Measuring Image Performance
Measuring Image PerformanceMeasuring Image Performance
Measuring Image Performance
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 

Beyond Resizing: The Image Performance Checklist