SlideShare une entreprise Scribd logo
1  sur  83
Delivering Beautiful and Fast
Images and Video
Doug Sillars
@DougSillars
UX Connect London
November 6, 2018
Contact Me:
@DougSillars
Doug.Sillars@gmail.com
www.dougsillars.com
Doug Sillars
Freelance Developer Relations
Performance Audits: Web/Native
Workshops:
Performance/Images/Video
http://bit.ly/HighPerformanceAndroidApps
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
Fast is a Human Perception
• 100ms:
• 1s:
• 10s:
https://www.nngroup.com/articles/response-times-3-important-limits/
Perceived as instantaneous
Limit for uninterrupted train of thought: Delay is
noticed, but generally accepted
Limit for keeping focus
Images & Video make up 75% of Web Content
HTTPArchive mobile websites 15/02/18
4 Simple Image Optimizations
4 Simple Image Optimizations
1. Quality
2. Format
3. Sizing
4. Lazy Loading
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”
Median Savings (50th percentile):
• 2.83 seconds faster page load
• 419KB 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
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”
Median Improvement: 4.1s, 604 KB
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 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
Median Improvement: 2.7s, 416 KB
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
Median Improvement: 3.5s, 529 KB
Preview Images
Optimizing Content Delivery
Preview Images
https://github.com/technopagan/sqip
Lazy Loading: Experiments
Lazy Loading: Experiments
Lazy Loading: Experiments
Animated GIFs
Original MP4
1.4 MB
Animated GIFs
Animated GIFs
Animated GIF
3.8 MB
270% larger
Animated GIFs
Animated GIFs
MP4: 256 colors
247KB
93% smaller
Animated GIFs
Video Tags:
<video loop autoplay muted playsinline controls = "false” src="goats.mp4”/>
Video is not pre-loaded, will be last to download
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
Video
Video Quality Metrics
1.Does the Video Start?
2.Does the Video Stall?
3.Does it Look Good?
Video Startup
Conviva creen_Streaming_TV_Census_Report_FINAL.pdf
Q1 2018:
Video Startup
Conviva creen_Streaming_TV_Census_Report_FINAL.pdf
Q1 2018: Video Startup
16.9B total Video plays
400M Fail to Start
2B Abandoned before Start
..be Careful with Video Preload
Preload = “auto”
…be Careful with Preload
Background Video
Video Background
Video (as Downloaded): 5.3 MB
Video 5 MB
Audio 250 KB 5% of file
Best Practice:
To save bandwidth, remove the audio stream from videos that
are played silently.
Video Background: Mobile
Best Practice:
If Viewport will not support Video…
Don’t Download it
Video Background
Video Background
33.6 MB
27s
2560 x 1226
10 MBPS
Video Background
Best Practice:
Resize Video to reasonable size.
33.6 MB
27s
2560 x 1226
10 MBPS
Video Background
Best Practice:
Resize Video to reasonable size.
PROTIP: Renaming the file is not enough…
Video Resizing
• 1920x1080: 8.1 MB
• 1280x720: 4.3 MB
• 1080x608: 3.3 MB
• 720x405: 1.76 MB
http://res.cloudinary.com/dougsillars/video/upload/vc_auto,w_720/v1533591785/depend_p2ryou.mp4
Video Third Parties
Video Third Parties
Video Third Parties
Video Third Parties
Conclusion
Optimize Image:
Quality
Format
Sizing
Lazy Load if Possible
Only download Video when displayed
Strip audio if silent
Resize Videos for Mobile
Audit 3rd Party Videos
Streaming: Start with lower bitrates to speed video playback
Streaming: Conservative bitrates *may* reduce stalls, but will lower quality
Images
Video
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 and Video
Can Be Beautiful AND Fast

Contenu connexe

Tendances

Tendances (20)

Cork ux Meetup
Cork ux MeetupCork ux Meetup
Cork ux Meetup
 
Beautiful and Fast Images
Beautiful and Fast Images Beautiful and Fast Images
Beautiful and Fast Images
 
Waterford fast images
Waterford fast imagesWaterford fast images
Waterford fast images
 
Mobile web perf Amsterdam Tech Tips
Mobile web perf Amsterdam Tech TipsMobile web perf Amsterdam Tech Tips
Mobile web perf Amsterdam Tech Tips
 
Fastandbeautiful belfast
Fastandbeautiful belfastFastandbeautiful belfast
Fastandbeautiful belfast
 
Its timetostopstalling cambridgemot
Its timetostopstalling cambridgemotIts timetostopstalling cambridgemot
Its timetostopstalling cambridgemot
 
Its timetostopstalling sw_mobile_bristol
Its timetostopstalling sw_mobile_bristolIts timetostopstalling sw_mobile_bristol
Its timetostopstalling sw_mobile_bristol
 
Its timetostopstalling limerick
Its timetostopstalling limerickIts timetostopstalling limerick
Its timetostopstalling limerick
 
Imagesandvideo voxxeddays
Imagesandvideo voxxeddaysImagesandvideo voxxeddays
Imagesandvideo voxxeddays
 
Fast and Beautiful Images and Video
Fast and Beautiful Images and VideoFast and Beautiful Images and Video
Fast and Beautiful Images and Video
 
Edi ux fastandbeautiful
Edi ux fastandbeautifulEdi ux fastandbeautiful
Edi ux fastandbeautiful
 
Mobile App Performance, Dublin MOT
Mobile App Performance, Dublin MOTMobile App Performance, Dublin MOT
Mobile App Performance, Dublin MOT
 
Cologne webperf
Cologne webperfCologne webperf
Cologne webperf
 
Hamburg web perf meetup
Hamburg web perf meetupHamburg web perf meetup
Hamburg web perf meetup
 
Its timetostopstalling barcelonajs
Its timetostopstalling barcelonajsIts timetostopstalling barcelonajs
Its timetostopstalling barcelonajs
 
Its Time To Stop Stalling: Mobile App and Video Performance
Its Time To Stop Stalling: Mobile App and Video PerformanceIts Time To Stop Stalling: Mobile App and Video Performance
Its Time To Stop Stalling: Mobile App and Video Performance
 
Its timetostopstalling pentabar
Its timetostopstalling pentabarIts timetostopstalling pentabar
Its timetostopstalling pentabar
 
Its timetostopstalling londroid
Its timetostopstalling londroidIts timetostopstalling londroid
Its timetostopstalling londroid
 
Ministry of Testing Cork
Ministry of Testing CorkMinistry of Testing Cork
Ministry of Testing Cork
 
Fastandbeautiful full stacklondon
Fastandbeautiful full stacklondonFastandbeautiful full stacklondon
Fastandbeautiful full stacklondon
 

Similaire à Ux connect london_fastandbeautiful

Similaire à Ux connect london_fastandbeautiful (15)

Imagesandvideo stockholm fastandbeautiful
Imagesandvideo stockholm fastandbeautifulImagesandvideo stockholm fastandbeautiful
Imagesandvideo stockholm fastandbeautiful
 
Imagesandvideo stockholm webmeetup
Imagesandvideo stockholm webmeetupImagesandvideo stockholm webmeetup
Imagesandvideo stockholm webmeetup
 
Its timetostopstalling swp_munich
Its timetostopstalling swp_munichIts timetostopstalling swp_munich
Its timetostopstalling swp_munich
 
Its timetostopstalling mot_paris
Its timetostopstalling mot_parisIts timetostopstalling mot_paris
Its timetostopstalling mot_paris
 
Webcamp fastandbeautiful
Webcamp fastandbeautifulWebcamp fastandbeautiful
Webcamp fastandbeautiful
 
Fastandbeautiful dublin php
Fastandbeautiful dublin phpFastandbeautiful dublin php
Fastandbeautiful dublin php
 
Its timetostopstalling gdg_bruxelles
Its timetostopstalling gdg_bruxellesIts timetostopstalling gdg_bruxelles
Its timetostopstalling gdg_bruxelles
 
Its timetostopstalling gdg_zurich
Its timetostopstalling gdg_zurichIts timetostopstalling gdg_zurich
Its timetostopstalling gdg_zurich
 
Fastandbeautiful porto
Fastandbeautiful portoFastandbeautiful porto
Fastandbeautiful porto
 
Its Time To Stop Stalling Bucharest
Its Time To Stop Stalling BucharestIts Time To Stop Stalling Bucharest
Its Time To Stop Stalling Bucharest
 
Fastandbeautiful novi sad
Fastandbeautiful novi sadFastandbeautiful novi sad
Fastandbeautiful novi sad
 
Fastandbeautiful full stackporto
Fastandbeautiful full stackportoFastandbeautiful full stackporto
Fastandbeautiful full stackporto
 
Mobile App and Web Performance Testing
Mobile App and Web Performance TestingMobile App and Web Performance Testing
Mobile App and Web Performance Testing
 
Its Time To Stop Stalling BerlinDroid
Its Time To Stop Stalling BerlinDroidIts Time To Stop Stalling BerlinDroid
Its Time To Stop Stalling BerlinDroid
 
Its timetostopstalling gdgdusseldorf
Its timetostopstalling gdgdusseldorfIts timetostopstalling gdgdusseldorf
Its timetostopstalling gdgdusseldorf
 

Plus de Doug Sillars

Plus de Doug Sillars (20)

Fastandbeautiful gdg sacremento
Fastandbeautiful gdg sacrementoFastandbeautiful gdg sacremento
Fastandbeautiful gdg sacremento
 
Fastandbeautiful gd glittlerock
Fastandbeautiful gd glittlerockFastandbeautiful gd glittlerock
Fastandbeautiful gd glittlerock
 
Fastandbeautiful webinale
Fastandbeautiful webinaleFastandbeautiful webinale
Fastandbeautiful webinale
 
Ai powered images-pythonljubjana
Ai powered images-pythonljubjanaAi powered images-pythonljubjana
Ai powered images-pythonljubjana
 
Fastandbeautiful zagrebtechsauna
Fastandbeautiful zagrebtechsaunaFastandbeautiful zagrebtechsauna
Fastandbeautiful zagrebtechsauna
 
Video js zagreb
Video js zagrebVideo js zagreb
Video js zagreb
 
Vkmdp cologne
Vkmdp cologneVkmdp cologne
Vkmdp cologne
 
Ai powered images-gdgtirana
Ai powered images-gdgtiranaAi powered images-gdgtirana
Ai powered images-gdgtirana
 
A rt gallery pantalks
A rt gallery pantalksA rt gallery pantalks
A rt gallery pantalks
 
Ai powered images-sarajevo
Ai powered images-sarajevoAi powered images-sarajevo
Ai powered images-sarajevo
 
A rt gallery hub387
A rt gallery hub387A rt gallery hub387
A rt gallery hub387
 
Ai powered images-zurichpydata
Ai powered images-zurichpydataAi powered images-zurichpydata
Ai powered images-zurichpydata
 
Fastandbeautiful vienna
Fastandbeautiful viennaFastandbeautiful vienna
Fastandbeautiful vienna
 
Ai powered images-opieaivienna
Ai powered images-opieaiviennaAi powered images-opieaivienna
Ai powered images-opieaivienna
 
A rt gallery devfestlondon
A rt gallery devfestlondonA rt gallery devfestlondon
A rt gallery devfestlondon
 
Fastandbeautiful devfest london
Fastandbeautiful devfest londonFastandbeautiful devfest london
Fastandbeautiful devfest london
 
A rt gallery cardiff
A rt gallery cardiffA rt gallery cardiff
A rt gallery cardiff
 
Ai powered images-mobileera
Ai powered images-mobileeraAi powered images-mobileera
Ai powered images-mobileera
 
Fastandbeautiful oredev
Fastandbeautiful oredevFastandbeautiful oredev
Fastandbeautiful oredev
 
A rt gallery oredev
A rt gallery oredevA rt gallery oredev
A rt gallery oredev
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Ux connect london_fastandbeautiful

Notes de l'éditeur

  1. 47% smaller!
  2. 47% smaller! Or 65% smaller from original!
  3. file:///Users/demo/Documents/reponsiveimages.html
  4. www.kidzania.com
  5. www.kidzania.com
  6. www.kidzania.com
  7. www.depend.com
  8. www.depend.com
  9. www.depend.com
  10. www.depend.com