Slide 1

Slide 1 text

Responsive Images @mattdsteele

Slide 2

Slide 2 text

THIS IS WHY YOU’RE FAT

Slide 3

Slide 3 text

We’ve put on a little weight.

Slide 4

Slide 4 text

http://httparchive.org/trends.php#bytesTotal&reqTotal

Slide 5

Slide 5 text

http://httparchive.org/trends.php#bytesTotal&reqTotal Total Page Weight File Size (KB) 1400 1550 1700 1850 July August September October NovemberDecember January February March April May June

Slide 6

Slide 6 text

http://httparchive.org/trends.php#bytesTotal&reqTotal Total Page Weight File Size (KB) 1400 1550 1700 1850 July August September October NovemberDecember January February March April May June 1485kb 1521kb 1551kb 1590kb 1614kb 1701kb 1681kb 1710kb 1728kb 1762kb 1775kb 1808kb

Slide 7

Slide 7 text

http://httparchive.org/interesting.php Bytes Per Page by Content Type

Slide 8

Slide 8 text

http://httparchive.org/interesting.php Images Bytes Per Page by Content Type

Slide 9

Slide 9 text

http://httparchive.org/interesting.php HTML Other Flash Stylesheets Scripts Images Bytes Per Page by Content Type

Slide 10

Slide 10 text

RETINA- POCALYPSE

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

iPhone 3GS

Slide 13

Slide 13 text

320x480 iPhone 3GS

Slide 14

Slide 14 text

320x480 iPhone 3GS iPhone 4

Slide 15

Slide 15 text

320x480 640x960 (2x) iPhone 3GS iPhone 4

Slide 16

Slide 16 text

HTC One

Slide 17

Slide 17 text

1920x1080 (3x) HTC One

Slide 18

Slide 18 text

“Let’s make it responsive!”

Slide 19

Slide 19 text

Nexus 10

Slide 20

Slide 20 text

2560x1600 (2x) Nexus 10

Slide 21

Slide 21 text

2880x1800 (1.6x) MacBook Pro with Retina Display

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

320x213 41kb

Slide 26

Slide 26 text

320x213 41kb

Slide 27

Slide 27 text

320x213 41kb 640x425 137kb

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

1280x852 400kb

Slide 30

Slide 30 text

72% Responsive sites serve the same content to desktop & mobile http://www.guypo.com/uncategorized/real-world-rwd-performance-take-2/

Slide 31

Slide 31 text

Ugh.

Slide 32

Slide 32 text

Shortcut:

Slide 33

Slide 33 text

Slide 34

Slide 34 text

9+ SVG

Slide 35

Slide 35 text

Grunticon github.com/filamentgroup/grunticon

Slide 36

Slide 36 text

"Vectors are for chumps. I need bitmaps."

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Slide 39

Slide 39 text

Slide 40

Slide 40 text

Slide 41

Slide 41 text

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Art Direction

Slide 46

Slide 46 text

38 33 Under Consideration

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Screen Size ⊆ What You Need

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Viewport Size

Slide 52

Slide 52 text

Viewport Size Screen Density

Slide 53

Slide 53 text

Viewport Size Rendered Size Screen Density

Slide 54

Slide 54 text

Viewport Size Rendered Size Screen Density Image Dimensions

Slide 55

Slide 55 text

Viewport Size Rendered Size Screen Density Image Dimensions Browser knows?

Slide 56

Slide 56 text

Viewport Size Rendered Size Screen Density Image Dimensions Browser knows? ✓

Slide 57

Slide 57 text

Viewport Size Rendered Size Screen Density Image Dimensions Browser knows? ✓ ✓

Slide 58

Slide 58 text

Viewport Size Rendered Size Screen Density Image Dimensions Browser knows? ✓ ✓ ✗

Slide 59

Slide 59 text

Viewport Size Rendered Size Screen Density Image Dimensions Browser knows? ✓ ✓ ✗ ✗

Slide 60

Slide 60 text

Viewport Size Rendered Size Screen Density Image Dimensions

Slide 61

Slide 61 text

Viewport Size Rendered Size Screen Density Image Dimensions Author knows?

Slide 62

Slide 62 text

Viewport Size Rendered Size Screen Density Image Dimensions Author knows? ✗ ✗ ✓ ✓

Slide 63

Slide 63 text

srcset & sizes

Slide 64

Slide 64 text

Image dimensions srcset="large.jpg 1200w, medium.jpg 640w, small.jpg 320w"

Slide 65

Slide 65 text

Image dimensions URL srcset="large.jpg 1200w, medium.jpg 640w, small.jpg 320w"

Slide 66

Slide 66 text

Image dimensions Width URL srcset="large.jpg 1200w, medium.jpg 640w, small.jpg 320w"

Slide 67

Slide 67 text

Rendered Size sizes="(min-width: 1024px) 300px, (min-width: 640px) 50vw, 100vw"

Slide 68

Slide 68 text

Rendered Size For this MQ: sizes="(min-width: 1024px) 300px, (min-width: 640px) 50vw, 100vw"

Slide 69

Slide 69 text

Rendered Size For this MQ: Image renders this big sizes="(min-width: 1024px) 300px, (min-width: 640px) 50vw, 100vw"

Slide 70

Slide 70 text

Rendered Size For this MQ: Image renders this big Default sizes="(min-width: 1024px) 300px, (min-width: 640px) 50vw, 100vw"

Slide 71

Slide 71 text

A responsive image

Slide 72

Slide 72 text

Screen Densities

Slide 73

Slide 73 text

Configurable

Slide 74

Slide 74 text

Configurable •HD Mode

Slide 75

Slide 75 text

Configurable •HD Mode •Speed Mode

Slide 76

Slide 76 text

Configurable •HD Mode •Speed Mode •Crappy Network Mode

Slide 77

Slide 77 text

srcset 32 Under Consideration

Slide 78

Slide 78 text

Fallbacks built-in

Slide 79

Slide 79 text

Or: Picturefill http://scottjehl.github.io/picturefill/

Slide 80

Slide 80 text

Go Forth And Get Skinny

Slide 81

Slide 81 text

@mattdsteele flic.kr/p/7TH4dc