SlideShare a Scribd company logo
Delivering Fast and Beautiful Images
Doug Sillars
@DougSillars
London
July 11, 2019
Contact Me:
@DougSillars
Doug.Sillars@gmail.com
www.dougsillars.com
Doug Sillars
Freelance Developer Relations
Performance Audits: Web/Native
Workshops:
Performance/Images/Video/AR/ML
http://bit.ly/HighPerformanceAndroidApps
Fastandbeautiful full stackporto
0.5
0.6
0.7
0.8
0.9
Standing in Line Standing on the
edge of a virtual
cliff
Experiencing
Mobile Delays
Solving a Math
Problem
https://www.ericsson.com/res/docs/2016/mobility-report/emr-feb-2016-the-stress-of-steaming-delays.pdf
Stress
Large Downloads Induce Delays in Rendering
3s: 53% of Users Abandon Mobile Sites
500ms: 26% Frustration
8% Engagement
100ms: 1% Revenue Walmart & Amazon (Desktop 2001)
4% Mobile Users Throw Their Phones
https://www.doubleclickbygoogle.com/articles/mobile-speed-matters
http://bit.ly/mobileWebStress
http://www.globaldots.com/how-website-speed-affects-conversion-rates/
https://www.mobilejoomla.com/blog/172-responsive-design-vs-server-side-solutions-infographic.html
Images Dominate the Web
HTTPArchive mobile websites 04/2019
4 Simple Image Optimizations
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
4 Simple Image Optimizations
Httparchive.org Webpagetest.org
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
Image Quality
magick -quality 85 riga.jpg riga85.jpg
http://res.cloudinary.com/dougsillars/image/upload/q_85/v1520504964/IMG_20180301_114117_tzasan.jpg
Lighthouse:
Recommends 85% quality on all images
https://developers.google.com/speed/docs/insights/OptimizeImages
100%
3.6 MB
http://res.cloudinary.com/dougsillars/image/upload/v1529005982/IMG_20180614_184507_ssuk1i.jpg
85%
1.87 MB
q_85
http://res.cloudinary.com/dougsillars/image/upload/q_85/v1529005982/IMG_20180614_184507_ssuk1i.jpg
Image Quality Use “In The Wild”
500,000 mobile sites
Analyzed 3/15/18
Image Quality Use “In The Wild”
5M mobile sites
Analyzed May 1, 2019
48% score 1
10% score 0
32% score < 0.5
Image Quality Use “In The Wild”
Median Savings (50th percentile):
• 3.7 seconds faster page load
• 133 KB less data
Image Quality Use “In The Wild”
Median Savings (50th percentile):
• 9.7 seconds faster page load
• 1.6 MB less data
50%
914 KB
q_50
http://res.cloudinary.com/dougsillars/image/upload/q_50/v1529005982/IMG_20180614_184507_ssuk1i.jpg
20%
513 KB
q_20
http://res.cloudinary.com/dougsillars/image/upload/q_20/v1529005982/IMG_20180614_184507_ssuk1i.jpg
Graphing the Results
https://developers.google.com/speed/docs/insights/OptimizeImages
Graphing the Results
https://developers.google.com/speed/docs/insights/OptimizeImages
Automate Quality vs. File Size
• Butteraugli
• SSIM: Structural SIMilarity
https://github.com/technopagan/cjpeg-dssim
cjpeg-dssim jpegoptim riga.jpg
http://res.cloudinary.com/dougsillars/image/upload/q_auto/v1529005982/IMG_20180614_184507_ssuk1i.jpg
SSIM
1.46 MB
http://res.cloudinary.com/dougsillars/image/upload/q_auto/v1529005982/IMG_20180614_184507_ssuk1i.jpg
Graphing the Results
https://developers.google.com/speed/docs/insights/OptimizeImages
Results:
• Test Load on Motorola G4:
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
Image Formats – Average Size
HTTPArchive mobile websites 15/02/18
Image Formats – Average Size
HTTPArchive mobile websites 15/02/18
Scalable Vector Graphics (SVG)
Images drawn as shapes
infinitely scalable
XML - Can be added inline to HTML document
https://gist.github.com/hail2u/2884613?short_path=66a60ff
Scalable Vector Graphics (SVG)
Images drawn as shapes
infinitely scalable
XML - Can be added inline to HTML document
https://gist.github.com/hail2u/2884613?short_path=66a60ff
Scalable Vector Graphics (SVG)
Scalable Vector Graphics (SVG)
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Brotli 525 bytes
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Brotli 525 bytes
Scalable Vector Graphics (SVG)
<style >
.svgorange {
filter: invert(.5) sepia(1)
saturate(5) hue-rotate(5deg);
}
</style>
<img class="svgorange" src ="map-
marker-circle.svg">
https://medium.com/@union_io/swapping-fill-color-on-image-tag-svgs-using-css-filters-fa4818bf7ec6
Scalable Vector Graphics (SVG)
Image Formats – Average Size
HTTPArchive mobile websites 15/02/18
Image Formats – PNGs
https://dougsillars.com/2019/02/10/using-screenshots-in-production/
Image Formats – Screenshots -> JPG
https://dougsillars.com/2019/02/10/using-screenshots-in-production/
Image Formats – Average Size
HTTPArchive mobile websites 15/02/18
File Format: WebP
https://caniuse.com/#feat=webp
SSIM + WebP
986 KB
http://res.cloudinary.com/dougsillars/image/upload/q_auto,f_auto/v1529005982/IMG_20180614_184507_
File Format: Web
<picture>
<source width = "100%" type="image/webp" srcset=”riga.webp">
<img width = "100%" src=”riga_cjpeg_dssim.jpg"
alt=”Riga, Latvia">
</picture>
Image Format Use “In The Wild”
500,000 mobile sites
Analyzed 3/15/18
Image Format Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
18% score 1
28% score 0
62% score <0.5
Image Format Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page:
139 KB less data
6.6s faster load
Image Format Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page:
2.4 MB less data
15s faster load
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
Image Sizing
-
Image Sizing
Image Sizing
-
Image Sizing
624
832
-
Image Sizing
624
832
12,979,000 pixels
519,000 pixels
_________________
-
12,460,000 pixels
Image Sizing
624
832
12,979,000 pixels
519,000 pixels
_________________
-
12,460,000 pixels
Image Processing
1M
pixels
Download (s) Image Decode
(ms)
Desktop 14 78
Moto G4 14.2 218
Alcatel 1X 14.2 820
Image Sizing
https://twitter.com/paulcalvano/status/928751141843808256
Image Sizing
-
Responsive Images:
Generate a set of images
25 KB difference in size
Responsive Images
624
832
625,000 pixels
-
106,000 pixels
519,000 pixels
_________________
Responsive Breakpoint Generation
https://github.com/cloudinary/responsive_breakpoints_generator
http://www.responsivebreakpoints.com/
Responsive Images
Responsive Images Use “In The Wild”
500,000 mobile sites
Analyzed 3/15/18
Responsive Images Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
58% score 1
8% score 0
26% score <0.5
Responsive Images Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page saves:
130KB data
1.6s faster load
Responsive Images Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page saves:
2.4 MB data
14s faster load
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
Lazy Load
https://calendar.perfplanet.com/2017/progressive-image-loading-using-intersection-observer-and-sqip/
Lazy Load
https://calendar.perfplanet.com/2017/progressive-image-loading-using-intersection-observer-and-sqip/
Lazy Loading Use “In The Wild”
442,000 mobile sites
Analyzed 3/15/18
Lazy Loading Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
56% score 1
8% score 0
28% score <0.5
Lazy Loading Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page saves:
334KB
3.1s
Lazy Loading Use “In The Wild”
5M mobile sites
Analyzed 5/1/19
Median page saves:
2.84 MB
12 s
Preview Images
Optimizing Content Delivery
Preview Images
https://github.com/technopagan/sqip
Lazy Loading: Experiments
Lazy Loading: Chrome Experiments
Lazy Loading: Chrome Experiments
Animated GIFs
Original MP4
1.4 MB
Animated GIFs
Animated GIFs
Animated GIF
3.8 MB
270% larger
Animated GIFs
“The Graphics Interchange Format is not
intended as a platform for animation, even
though it can be done in a limited way.”
-GIF89a Specification
https://www.w3.org/Graphics/GIF/spec-gif89a.txt
Animated GIFs
Animated GIFs
MP4: 256 colors
247KB
93% smaller
Animated GIFs: Social Media
Animated GIFs: Social Media
#FAKENEWS
Animated GIFs: Social Media
Animated GIFs: as Video!
Video Tags:
<video loop autoplay muted playsinline controls = "false” src="goats.mp4”/>
Img tags are fast!
<picture>
<source type="video/mp4" srcset=”goats.mp4">
<source type="image/webp" srcset=”goats.webp">
<img src=”goats.gif">
</picture>
https://calendar.perfplanet.com/2017/animated-gif-without-the-gif/
Animated GIFs
Addendum: What Are Your Customers Saying?
Addendum: Lite Mode: Save-Data
Save-Data: on
Addendum: Lite Mode: Save-Data
Addendum: Save-Data
Addendum: Save-Data
q_auto -> q_auto:eco
180KB -> 135 KB
https://res.cloudinary.com/dougsillars/image/upload/w_1400,q_auto/v1540978150/IMG_20181028_153301_okeb2b.jpg
Addendum 2: Network Info
Addendum 2: Network Info
// Network type that browser uses
navigator.connection.type;
// Effective bandwidth estimate
navigator.connection.downlink
// Effective round-trip time estimate
navigator.connection.rtt
// Upper bound on the downlink speed of the first network hop
navigator.connection.downlinkMax
Addendum 2: Network Info
// Network type that browser uses
navigator.connection.type;
// Effective bandwidth estimate
navigator.connection.downlink
// Effective round-trip time estimate
navigator.connection.rtt
// Upper bound on the downlink speed of the first network hop
navigator.connection.downlinkMax
500 KBPS
Addendum 3: Base 64 Encoding
Images embedded as Base64 in your HTML/CSS/JS
• Fewer Requests
• Images Now Block Rendering of Page
• Images are 20-30% larger
• Caching is limited
• Difficult to reference more than once
Addendum 3: Base 64 Encoding
• 91KB CSS Shared as University Template
• 48KB is SVG
• Never Appears on Any Page
Departments, colleges and other units of
the University of Nebraska–Lincoln should
use the Nebraska N as a main identifier,
not the University seal, on all publications,
invitations, websites and other electronic
media.
https://unlcms.unl.edu/wdn/templates_4.1/css/all.css?dep=4.1.36
Addendum 3: Base 64 Encoding
https://cdn.glowing.com/generated/css/base.474240e8485dbff13fd3652d24ef83bc.css
Conclusion
Optimize Image:
Quality
Format
Sizing
Lazy Load if Possible
aGIFs to movies
No Base64 Encoded Images
Monitor Customer’s headers
Images
Summary
Testing:
WebPageTest https://www.webpagetest.org
HttpArchive https://httparchive.org
Images:
ImageMagick https://www.imagemagick.org
SSIM https://github.com/technopagan/cjpeg-dssim
LazySizes https://github.com/aFarkas/lazysizes
Responsive Breakpoints http://www.responsivebreakpoints.com/
Cloudinary https://www.cloudinary.com
Tooling
Conclusion
Images CAN Be Beautiful AND Fast
Love Building with Video and Images?
Media Developer Expert
mde-comm@cloudinary.com
Become a

More Related Content

PPTX
Fastandbeautiful full stacklondon
PPTX
Fastandbeautiful dublin php
PPTX
Fastandbeautiful full stacklondon
PPTX
Fastandbeautiful oredev
PPTX
Fastandbeautiful porto
PPTX
Fastandbeautiful ux wurzburg
PPTX
Fastandbeautiful novi sad
PPTX
Fastandbeautiful belgrade
Fastandbeautiful full stacklondon
Fastandbeautiful dublin php
Fastandbeautiful full stacklondon
Fastandbeautiful oredev
Fastandbeautiful porto
Fastandbeautiful ux wurzburg
Fastandbeautiful novi sad
Fastandbeautiful belgrade

What's hot (20)

PPTX
Fastandbeautiful chemnitz
PPTX
Fastandbeautiful yglf
PPTX
Fastandbeautiful mobilewarsaw
PPTX
Fastandbeautiful devdayseu
PPTX
Fastandbeautiful krakow
PPTX
Fastandbeautiful gdgtallinn
PPTX
Fastandbeautiful zagrebtechsauna
PPTX
Fastandbeautiful gdgtartu
PPTX
Fastandbeautiful devfest london
PPTX
Fastandbeautiful vienna
PPTX
Snowcamp fastandbeautiful
PPTX
Fastandbeautiful gdg sacremento
PPTX
Edi react fastandbeautiful
PPTX
Fastandbeautiful gd glittlerock
PPTX
Fastandbeautiful webinale
PPTX
Fastandbeautiful seattle css
POTX
Its timetostopstalling limerick
PPTX
Imagesandvideo stockholm fastandbeautiful
PPTX
Imagesandvideo voxxeddays
POTX
Mobile App Performance, Dublin MOT
Fastandbeautiful chemnitz
Fastandbeautiful yglf
Fastandbeautiful mobilewarsaw
Fastandbeautiful devdayseu
Fastandbeautiful krakow
Fastandbeautiful gdgtallinn
Fastandbeautiful zagrebtechsauna
Fastandbeautiful gdgtartu
Fastandbeautiful devfest london
Fastandbeautiful vienna
Snowcamp fastandbeautiful
Fastandbeautiful gdg sacremento
Edi react fastandbeautiful
Fastandbeautiful gd glittlerock
Fastandbeautiful webinale
Fastandbeautiful seattle css
Its timetostopstalling limerick
Imagesandvideo stockholm fastandbeautiful
Imagesandvideo voxxeddays
Mobile App Performance, Dublin MOT
Ad

Similar to Fastandbeautiful full stackporto (13)

PPTX
Fastandbeautiful seattlevue
PPTX
Edi ux fastandbeautiful
PPTX
Imagesandvideo stockholm webmeetup
PPTX
Fastandbeautiful belfast
PPTX
Imagesandvideo tallinn
PPTX
Mcr fredfastvideoandimages
PPTX
Hackference
PPTX
Ux connect london_fastandbeautiful
PPTX
Reading gdg images
PPTX
Turin webperf meetup
PPTX
Webcamp fastandbeautiful
PPTX
Milano ux
PPTX
OSCAL: Free and Open Source Tools for Image and Video Performance
Fastandbeautiful seattlevue
Edi ux fastandbeautiful
Imagesandvideo stockholm webmeetup
Fastandbeautiful belfast
Imagesandvideo tallinn
Mcr fredfastvideoandimages
Hackference
Ux connect london_fastandbeautiful
Reading gdg images
Turin webperf meetup
Webcamp fastandbeautiful
Milano ux
OSCAL: Free and Open Source Tools for Image and Video Performance
Ad

More from Doug Sillars (20)

PPTX
Ai powered images-pythonljubjana
PPTX
Video js zagreb
PDF
Vkmdp cologne
PPTX
Ai powered images-gdgtirana
PPTX
A rt gallery pantalks
PPTX
Ai powered images-sarajevo
PPTX
A rt gallery hub387
PPTX
Ai powered images-zurichpydata
PPTX
Ai powered images-opieaivienna
PPTX
A rt gallery devfestlondon
PPTX
A rt gallery cardiff
PPTX
Ai powered images-mobileera
PPTX
A rt gallery oredev
PPTX
A rt gallery webcamp-zg
PPTX
Qa fest kiev_when its just too slow
PPTX
A rt gallery coding-serbia_novisad
PPTX
Armadajs video
PPTX
Belgrade when its just too slow
PPTX
Ai powered images-geneva
PPTX
A rt gallery limerick-galway
Ai powered images-pythonljubjana
Video js zagreb
Vkmdp cologne
Ai powered images-gdgtirana
A rt gallery pantalks
Ai powered images-sarajevo
A rt gallery hub387
Ai powered images-zurichpydata
Ai powered images-opieaivienna
A rt gallery devfestlondon
A rt gallery cardiff
Ai powered images-mobileera
A rt gallery oredev
A rt gallery webcamp-zg
Qa fest kiev_when its just too slow
A rt gallery coding-serbia_novisad
Armadajs video
Belgrade when its just too slow
Ai powered images-geneva
A rt gallery limerick-galway

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Modernizing your data center with Dell and AMD
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Monthly Chronicles - July 2025
NewMind AI Weekly Chronicles - August'25 Week I
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Modernizing your data center with Dell and AMD
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Fastandbeautiful full stackporto

Editor's Notes

  • #24: 47% smaller!
  • #30: 1149 bytes, 700 Zipped
  • #31: 1149 bytes, 700 Zipped
  • #32: 1149 bytes, 700 Zipped
  • #33: 1149 bytes, 700 Zipped
  • #34: 1149 bytes, 700 Zipped
  • #35: 1149 bytes, 700 Zipped
  • #36: 1149 bytes, 700 Zipped
  • #37: 1149 bytes, 700 Zipped
  • #38: 1149 bytes, 700 Zipped
  • #39: 1149 bytes, 700 Zipped
  • #40: 1149 bytes, 700 Zipped
  • #46: 47% smaller! Or 65% smaller from original!
  • #77: file:///Users/demo/Documents/reponsiveimages.html