high performance images: beautiful shouldn't mean slow (velocity eu 2015)

102
@guypod High Performance Images Beautiful shouldn’t mean Slow

Upload: guy-podjarny

Post on 15-Feb-2017

5.351 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

High Performance Images

Beautiful shouldn’t mean Slow

Page 2: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Average Web Page Weight(Sep ’15)

Not 37%

Images 63%

Source: HTTP Archive

Page 3: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Images On Average Page

Sep '12 Jun '13 Jun '14 Sep '15

696 KB891 KB

1,128 KB

1,383 KB

50 Reqs 56 Reqs 55 Reqs 54 Reqs

Requests KB

~2x!!!

Source: HTTP Archive

Page 4: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Images Impact Performance

0

4750

9500

14250

19000

Load Time, 3G Speed

With Images No Images

-30%

Page 5: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

What Can you do?

Page 6: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Compression

Page 7: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Loading

Page 8: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Operationalizing Image Optimization

Page 9: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Compression

Page 10: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Average Resource Size

CSS

JS

JPEG

0 10 20 30 40

37 KB

16 KB

9 KB

Page 11: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

RWD Sites Use Big Images

0

10

20

30

40

JPEG Size PNG Size

7.1 KB

20.8 KB

10 KB

31.6 KB

RWD Not RWD

Page 12: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #1: Pick The Right Format

Page 13: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Formats On The WebOther 2%

GIF 23%

PNG 30%

JPEG 45%

Page 14: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

GIF• 28 Years Old (1987)

• 256 Colors

• Supports “Simple” Transparency

• Supports Animation

• Patented (now expired)

Page 15: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

PNG

• 19 Years Old (1996)

• 8-32 bit color palettes

• Alpha Transparency

• Not patented

Page 16: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

GIF -> PNG = 21% Savings

PNG File Size GIF File Size

Source: Styoan Stefanov, “Give PNG A Chance” (2009)

Page 17: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

JPEG

• 23 years old (1992)

• RGB Colors (24 bit)

• No Transparency Support

• A Lossy Format

Page 18: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Bitmap

JPEG

Bitmap≠

Bitmap

PNG

Bitmap=

Lossy Compression

Lossless Compression

Page 19: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

JPEG

• 23 years old (1992)

• RGB Colors (24 bit)

• No Transparency Support

• A Lossy Format

Page 20: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

PNG -> JPG = MUCH SmallerPNG, 574 KB JPG, 110 KB

Page 21: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

JPEG: No Transparency

JPEGPNG

Page 22: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

WebP

0

3.75

7.5

11.25

15

File Size (KB)JPEG (q75) WebP

9.9 KB

14.4 KB

0

0.825

1.65

2.475

3.3

Bytes Per PixelPNG WebP

2.42 bpp

3.27 bpp -26% -31%

Source: Google Studies

Page 23: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

WebP Browser Support

Page 24: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

BPG• Less than 1 year old

• Lossless & Lossy

• Based on Video encoder HEVC

• H.265, successor of H.264

• Beat WebP & J2K in Mozilla Study

• Free (LGPL)Fabrice Bellard

(Creator of ffmpeg)

Page 25: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

FLIF• 0 years old

• Lossless

• Progressive

• Responsive Friendly

• No browser support

• Free (GPL)

Source: FLIF Creators Jon Sneyers & Harshad RJ

Page 29: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

New Image FormatsWebP JPEG XR JPEG 2000

Support Chrome, Opera, Android 4.x IE 10+ Safari on

iOS, OS X

Savings (over JPEG) 40-50% ~25% 15-20%

Mime Type image/webp image/vnd.ms-photo Soon: image/jxr image/jp2

Identification Accept: image/webp

Detect IE 10+

DetectSafari 5+

Page 30: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Using Custom FormatsClient Side

<script src="picturefill.js"></script> <picture> <source type="image/webp" srcset="book.webp"> <source type="image/vnd.msphoto" srcset="book.jxr"> <img src="book.jpg" alt="a book"> </picture>

Page 31: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Using Custom FormatsServer Side, Single URL

GET /book.jpg GET /book.jpg

OriginCDN/Cache

Page 32: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Using Custom FormatsServer Side, Single URL

GET /book.jpg GET /book.jpg

GET /book.jpg Accept: image/webp

GET /book.webp

OriginCDN/Cache

Page 33: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Using Custom FormatsServer Side, Single URL

GET /book.jxr

GET /book.jpg GET /book.jpg

GET /book.webp

GET /book.jpg User-Agent: MSIE 10 Accept: image/jxr*

OriginCDN/Cache

* Spartan

GET /book.jpg Accept: image/webp

Page 34: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #1: Pick The Right Format

Page 35: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #2: Control Quality

Page 36: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

JPEG Quality

High Quality

Low Quality

Page 37: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Quality: 90Size: 66 KB

Quality: 75 Size: 37 KB

Quality: 40Size: 21 KB

Quality: 25 Size: 16 KB

Page 38: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Quality: 90 Size: 66 KB

Quality: 75Size: 37 KB

Quality: 40Size: 21 KB

Quality: 25Size: 16 KB

Page 39: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Quality Scale Is Per Format

Source: Nick Doyle Performance Calendar

Sim

ilarit

y

0.00

0.06

0.13

0.19

0.25

Quality0 25 50 75 100

JPEGJPEG XRWebP

Page 40: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Detecting Excessive QualityWebPageTest

• Some stats about image quality on the web?

Page 41: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Detecting Excessive QualityPageSpeed Insights

• Some stats about image quality on the web?

Page 42: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #2: Control Quality

Page 43: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

SIZE Doesn’t matter

It’s all about

TECHNIQUE

Page 44: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Loading

Page 45: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #3: Size Images To Device

Page 46: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Shrink

102 KB 1876 × 520

(975,520 pixels)

Page 47: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Shrink

866px

240px

1876px

520px

.hp07img {width: 100%}

Page 48: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Shrink

866px

240px

1876px

520px

207,840 pixels

975,520 pixels

79% wasted pixels (~770K)

Page 49: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Shrink

866px

240px

1876px

520px

35,345 Bytes

110,744 Bytes

79% wasted pixels 68% wasted bytes

(~75KB)

Page 50: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Shrink

866px

240px

1876px

520px

79% wasted pixels 68% wasted bytes

79% wasted memory (3MB)

831K Mem Bytes

975,520 * 4(RGBA) = 3.9M Memory Bytes

Page 51: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

54IMAGES

On an Average Page

Page 52: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

– Jen Fitzpatrick, Google Maps

“...25% of new Android phones have only 512MB of RAM.”

Page 53: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & ShrinkProcessing Times

Source: Tim Kadlec, “Mobile Image Processing”

Page 54: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Implementing Responsive Images

<img src="small.jpg" srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320w" sizes="(min-width: 36em) 33.3vw, 100vw" alt="A rad wolf">

Page 55: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Implementing Responsive Images

<img src="small.jpg" srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320w" sizes="(min-width: 36em) 33.3vw, 100vw" alt="A rad wolf">

Hint, Hint…

Page 56: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Implementing Responsive Images

<img src="small.jpg" srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320w" sizes="(min-width: 36em) 33.3vw, 100vw" alt="A rad wolf">

Hint, Hint…

Page 57: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Implementing Responsive Images

<picture> <source media="(min-width: 40em)"

srcset="big.jpg 1x, big-hd.jpg 2x"> <source srcset="small.jpg 1x, small-hd.jpg 2x"> <img src="fallback.jpg" alt=""> </picture>

Page 58: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Implementing Responsive Images

<picture> <source media="(min-width: 40em)"

srcset="big.jpg 1x, big-hd.jpg 2x"> <source srcset="small.jpg 1x, small-hd.jpg 2x"> <img src="fallback.jpg" alt=""> </picture>

Use Picturefill

Page 59: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Which Breakpoints To Use?What Are your Users Using?

Page 60: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Which Breakpoints To Use?How Big & Complex Are Your Images?

• Your Analytics

Source: Jason Grigsby, “Sensible Jumps In Responsive Image File Sizes”

Width Height File Size

1 320 213 25K2 453 302 44K3 579 386 65K4 687 458 85K5 786 524 104K6 885 590 124K7 975 650 142K8 990 660 151K

Page 61: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Which Breakpoints To Use?How Big & Complex Are Your Images?

• Your Analytics

point # Width Height File Size

1 320 213 9.0K2 731 487 29K3 990 660 40K

Source: Jason Grigsby, “Sensible Jumps In Responsive Image File Sizes”

Page 62: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

FLIF Progressive “Breakpoints”

Page 63: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

1969x1307 pixels 299,643 bytes

FLIF Progressive “Breakpoints”

Page 64: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

1969x1307 pixels All 299,643 bytes

653x985 pixels (1:2) First 80,389 bytes

FLIF Progressive “Breakpoints”

Page 65: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

1969x1307 pixels All 299,643 bytes

653x985 pixels (1:2) First 80,389 bytes

492x326 pixels (1:4) First 37,014 bytes

FLIF Progressive “Breakpoints”

Page 66: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #3: Size Images To Device

Page 67: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #4: Prioritize Critical Images

Page 68: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Below The Fold

Etsy 82%

Velocity 91%

Guardian 92%

Page 69: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Page Content

Not Visible 62%

Visible 38%

On A Typical Page & Desktop Screen…

Image Requests

Not Visible 80%

Visible 20%

Page 70: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Hide

Page 71: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Hide

img {display: none}

Page 72: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Download & Hide

Image Requests 79 78

Image Weight 2,258 KB 2,251 KB

Page 73: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Lazy Load Images

<img src="book.jpg" alt="A Book">

<img src="1px.gif" data-src="book.jpg" alt="A Book" onload="loadImage(this)">

Page 74: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Lazy Load Images<script> function loadImage(img) { var dataSrc = imgs[i].getAttribute("data-src"); if (dataSrc && isAboveTheFold(img)) { img.onload = null; img.src = dataSrc; } } </script> <img src="1px.gif" data-src="book.jpg" alt="A Book" onload="loadImage(this)">

Page 75: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Lazy Load Images<script> function loadImage(img) { var dataSrc = imgs[i].getAttribute("data-src"); if (dataSrc && isAboveTheFold(img)) { img.onload = null; img.src = dataSrc; } } // Repeat check on viewport changes (scroll, resize...) </script> <img src="1px.gif" data-src="book.jpg" alt="A Book" onload="loadImage(this)">

Page 76: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Defer Load Images<script> function loadImage(img, force) { var dataSrc = imgs[i].getAttribute("data-src"); if (dataSrc && (force || isAboveTheFold(img)) ) { img.onload = null; img.src = dataSrc; } else if (deferOthers) { window.addEventListener("load",

function() { loadImage(img,true)}); }} </script>

Page 77: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

The Infamous

PRELOADER

Page 78: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser<html> <head> <script src="main.js"></script> <link src="styles.css" type="text/css"> </head> <body> <img src="book.jpg"/> <img src="bag.jpg"/> </body> </html>

Page 79: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser

main.js

styles.css

book.jpg

bag.jpg

7

<html> <head> <script src="main.js"></script> <link src="styles.css" type="text/css"> </head> <body> <img src="book.jpg"/> <img src="bag.jpg"/> </body> </html>

Page 80: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser & Pre-parser

main.js

styles.css

book.jpg

bag.jpg

<html> <head> <script src="main.js"></script> <link src="styles.css" type="text/css"> </head> <body> <img src="book.jpg"/> <img src="bag.jpg"/> </body> </html>

Page 81: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser & Pre-parser

main.js

styles.css

book.jpg

bag.jpg

<html> <head> <script src="main.js"></script> <link src="styles.css" type="text/css"> </head> <body> <img src="book.jpg"/> <img src="bag.jpg"/> </body> </html>

Page 82: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser & Pre-parser

main.js

styles.css

book.jpg

bag.jpg

11

<html> <head> <script src="main.js"></script> <link src="styles.css" type="text/css"> </head> <body> <img src="book.jpg"/> <img src="bag.jpg"/> </body> </html>

Page 83: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Who Initiates Image Downloads?

CSS 20%

HTML Parser 37%

Pre-parser 43%

Source: Ilya Grigorik, HTTP Archive

Page 84: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTML Parser & Pre-parser… <img src="1px.gif" data-src=“book.jpg" onload="loadImage(this)"/> <img src="bag.jpg" data-src="bag.jpg" onload="loadImage(this)"/> …

main.js

styles.css

book.jpg

bag.jpg

11

Page 85: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

HTTP/1.1 HTTP/2

Page 86: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

ExcessImages

Pre-ParserBoost

Page 87: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #1: LQIPLow Quality Image Placeholders

<img src=“LowQ.jpg” data-src=“HighQ.jpg” onload=“loadImage(this)”>

Page 88: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #1: LQIPLow Quality Image Placeholders

LowQ.jpg Quality: 25Size: 16 KB

<img src=“LowQ.jpg” data-src=“HighQ.jpg” onload=“loadImage(this)”>

Page 89: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #1: LQIPLow Quality Image Placeholders

LowQ.jpg Quality: 25Size: 16 KB

HighQ.jpg Quality: 90Size: 66 KB

<img src=“LowQ.jpg” data-src=“HighQ.jpg” onload=“loadImage(this)”>

Page 90: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #2: Selective Lazy Load

<img class="responsive-img" sizes="(min-width: 980px) 460px, (min-width: 740px) 340px, 100%" srcset="/w-460/<id>/500.jpg 460w, /w-340/<id>/500.jpg 340w,

/w-445/<id>/500.jpg 445w, /w-605/<id>/620.jpg 605w" src="/w-300/<id>/500.jpg">

Page 91: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #2: Selective Lazy Load

<img class="js-lazy-loaded-image responsive-img"

data-srcset="/w-220/<id>/1000.jpg 220w,

/w-160/<id>/1000.jpg 160w, /w-127/<id>/1000.jpg 127w"

data-sizes="(min-width: 980px) 220px,

(min-width: 740px) 160px, 127px" src="data:image/gif;base64,R0lGODlhAQABAAAAACH 5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">

Page 92: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Protip #2: Selective Lazy Load

JS Disabled

<img class="js-lazy-loaded-image responsive-img"

data-srcset="/w-220/<id>/1000.jpg 220w,

/w-160/<id>/1000.jpg 160w, /w-127/<id>/1000.jpg 127w"

data-sizes="(min-width: 980px) 220px,

(min-width: 740px) 160px, 127px" src="data:image/gif;base64,R0lGODlhAQABAAAAACH 5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">

Page 93: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #4: Prioritize Critical

Images

Page 94: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Operationalizing Image Optimization

Page 95: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #5: Encode Well• Quality Curve is NOT a Standard

• “Save For Web” is NOT just quality

• Decoding Is Standard, Encoding Is Not

• Notable Deltas: Chroma Subsampling, Per-Region Quality, Lossy PNG, SSIM-Based Quality…

• If you use one tool: ImageOptim (benchmark)

Page 96: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #6: Use Image Management Service

5 breakpoints * 2 Pixel Ratios * 3 Views *5 thumbnails * 100,000 Products/Articles…

And tomorrow?

Page 97: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Tip #6: Use Image Management Service

5 breakpoints * 2 Pixel Ratios * 3 Views *5 thumbnails * 100,000 Products/Articles…

And tomorrow?

/q75/w120/book.jpg GET /book.jpg

OriginTranscoder

<Big, High Res Img><Right-Sized Img>

Page 98: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Image Manager

Page 99: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Cloudinary

Page 100: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

What Can You Do?

Enforce a Performance Budget

Image Compression

Choose The Right Format

Control Quality

Image Loading

Use Responsive Images

Prioritize Critical Content

Image Operations

Encode Well

Transcode in Proxy

Page 101: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypodFREE Copy at

http://bit.ly/hpi-preview

Page 102: High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)

@guypod

Thank You!Guy Podjarny

@guypod

Reminder Free HPI Link:http://bit.ly/hpi-preview