cloudinary webinar responsive images

59
IMAGES RESPONSIVE PAST, PRESENT, & FUTURE ERIC PORTIS • CLOUDINARY WEBINAR • 2016-11-16

Upload: can-ozdoruk

Post on 24-Jan-2017

47 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Cloudinary Webinar Responsive Images

IMAGES RESPONSIVEPAST, PRESENT, & FUTURE

ERIC PORTIS • CLOUDINARY WEBINAR • 2016-11-16

Page 2: Cloudinary Webinar Responsive Images

WHO?QUESTION #1

Page 3: Cloudinary Webinar Responsive Images
Page 4: Cloudinary Webinar Responsive Images
Page 5: Cloudinary Webinar Responsive Images

SHIP HAPPENS

Page 6: Cloudinary Webinar Responsive Images

★URBANA!

Page 7: Cloudinary Webinar Responsive Images

RESPONSIVE IMAGES COMMUNITY GROUP

http://ricg.io

Page 8: Cloudinary Webinar Responsive Images

WHAT!?QUESTION #2

Page 9: Cloudinary Webinar Responsive Images

<img>

Page 10: Cloudinary Webinar Responsive Images

src="insufficent"><img

Page 11: Cloudinary Webinar Responsive Images

SURVEY!Who’s used these new features?

Page 12: Cloudinary Webinar Responsive Images

WHY?QUESTION #3

Page 13: Cloudinary Webinar Responsive Images

BITMAPS ARE

FLUID

FIXED

THE WEB IS

vs.

Page 14: Cloudinary Webinar Responsive Images

BITMAP IMAGES ARE THE BIGGEST PERFORMANCE BOTTLENECK ON THE RESPONSIVE WEB

Page 15: Cloudinary Webinar Responsive Images

65%of the web is

IMAGEShttp://httparchive.org/interesting.php#bytesperpage

Page 16: Cloudinary Webinar Responsive Images

1614 kb 2016

2011 577 kb

http://httparchive.org/trends.php#bytesImg&reqImg

Page 17: Cloudinary Webinar Responsive Images

30” Cinema Display 2560 x 1600

Page 18: Cloudinary Webinar Responsive Images

iPhone 7 Plus 2280 x 1242 (logical)

30” Cinema Display 2560 x 1600

Page 19: Cloudinary Webinar Responsive Images

iPhone 6 Plus 2280 x 1242 (logical)

30” Cinema Display 2560 x 1600

Retina iMac 5120 x 2880

Page 20: Cloudinary Webinar Responsive Images

1024 x 768 32%

1280 x 800 23%

1280 x 1024 11%

1440 x 900 10%

2009

OTHER 4%

OTHER 24%

1366 x 768 13%

1920 x 1080 9%

360 x 640 8%

768 x 1024 7%

2015http://statcounter.com

Page 21: Cloudinary Webinar Responsive Images

1024 x 768 32%

1280 x 800 23%

1280 x 1024 11%

1440 x 900 10%

http://statcounter.com2009

OTHER 4%

OTHER 32%

360 x 640 16%

1366 x 678 14%

1920 x 1080 7%

375 x 667 4%

2016

Page 22: Cloudinary Webinar Responsive Images
Page 23: Cloudinary Webinar Responsive Images
Page 24: Cloudinary Webinar Responsive Images
Page 25: Cloudinary Webinar Responsive Images

VIEWPORT WIDTH WASTED IMAGE BYTES360px 72%

760px 53%

1260px 42%

http://timkadlec.com/2013/06/why-we-need-responsive-images/

Page 26: Cloudinary Webinar Responsive Images
Page 27: Cloudinary Webinar Responsive Images

TIM KADLEC: Mobile Image Processing

VIDEO: https://www.youtube.com/watch?v=jP68rCjSSjM SLIDES: https://speakerdeck.com/tkadlec/mobile-image-processing-at-velocity-sc-2015

Page 28: Cloudinary Webinar Responsive Images

ADAPTABILITY PRESENTS NEW OPPORTUNITIES FOR VISUAL DESIGN

Page 29: Cloudinary Webinar Responsive Images

The day after the release of the original iPhone

~10 years later

nytimes.com on a small screen

Page 30: Cloudinary Webinar Responsive Images

Cropping

Some sort of… mammal? Look at that adorable Portuguese Water dog!

Page 31: Cloudinary Webinar Responsive Images

Otherwise altering

Page 32: Cloudinary Webinar Responsive Images

Otherwise altering

Page 33: Cloudinary Webinar Responsive Images

HOW?QUESTION #4

Page 34: Cloudinary Webinar Responsive Images

LIVE CODING!x descriptors

Page 35: Cloudinary Webinar Responsive Images

2x = (min-device-pixel-ratio: 2) ?

Page 36: Cloudinary Webinar Responsive Images

NO!

Page 37: Cloudinary Webinar Responsive Images

IF the user’s device has a device-pixel-ratio >= 2 THEN load this resource.

NO EXCEPTIONS!

MEDIA QUERIES:

Page 38: Cloudinary Webinar Responsive Images

Hey, browser! Here are some fun facts about the available resources.

SRCSET DESCRIPTORS:

YOU DECIDE!

Page 39: Cloudinary Webinar Responsive Images

x 2x

<img>large.jpg

Page 40: Cloudinary Webinar Responsive Images

2x = this resource has an “image density” of 2!

Page 41: Cloudinary Webinar Responsive Images

resource width in pixels — <img>’s width on the layout in CSS px

= image density e.g., 2x

.

.

Page 42: Cloudinary Webinar Responsive Images
Page 43: Cloudinary Webinar Responsive Images

medium.jpg is 640 pixels wide — its <img> has a width of 640 px on the layout

= medium.jpg has an image density of 1x

..

Page 44: Cloudinary Webinar Responsive Images

large.jpg is 1280 pixels wide — its <img> has a width of 640 px on the layout

= large.jpg has an image density of 2x

..

Page 45: Cloudinary Webinar Responsive Images

resource width in pixels — <img>’s width on the layout in CSS px

= image density e.g., 2x

.

.

Page 46: Cloudinary Webinar Responsive Images

x descriptors only work for fixed-width images!

Page 47: Cloudinary Webinar Responsive Images

LIVE CODING!w and sizes

Page 48: Cloudinary Webinar Responsive Images

LIVE CODING!picture and media

Page 49: Cloudinary Webinar Responsive Images

TAYLOR HUNT: When Responsive Images Get Ugly

http://codepen.io/Tigt/blog/when-responsive-images-get-ugly

Page 50: Cloudinary Webinar Responsive Images

LIVE CODING!picture and type

Page 51: Cloudinary Webinar Responsive Images

WHEN?QUESTION #5

Page 52: Cloudinary Webinar Responsive Images

NOW!

Page 53: Cloudinary Webinar Responsive Images

X W + SIZES PICTURE

CHROME 34+ 38+ 38+

OPERA 21+ 25+ 25+

FIREFOX 38+ 38+ 38+

IE Nope.

EDGE 12+ 12+ 13+

SAFARI 7.1+ 9+ 9.1+

Page 54: Cloudinary Webinar Responsive Images

X W + SIZES PICTURE

ANDROID STOCK 53+ 53+ 53+

CHROME FOR ANDROID 44+ 44+ 44+

OPERA MINI Impossible?

IE MOBILE Nada.

EDGE MOBILE 12+ 13+ 13+

iOS SAFARI 8+ 9.2+ 9.3+

Page 55: Cloudinary Webinar Responsive Images

ENHANCE <img src=“mobile-first.jpg” srcset=“progressive.jpg 640w, enhancement.jpg 1280w, works.jpg 1920w” alt=“Really.” />

Page 56: Cloudinary Webinar Responsive Images

https://scottjehl.github.io/picturefill/

POLYFILL WHEN YOU NEED TO

Picturefill!

Page 57: Cloudinary Webinar Responsive Images

srcset + sizes http://cloudinary.com/blog/responsive_images_with_srcset_sizes_and_cloudinary

Art Direction http://cloudinary.com/blog/automatically_art_directed_responsive_images

Breakpoints Generation http://www.responsivebreakpoints.com

Client Hints http://cloudinary.com/blog/automatic_responsive_images_with_client_hints

RESPONSIVE IMAGES WITH CLOUDINARY

Page 58: Cloudinary Webinar Responsive Images

Image Management — Buy vs. Build? Webinar Dec 7th, 2016 http://info.cloudinary.com/webinars.html

ImageCon First Ever Image and Video Management Conference March 1st, 2017 in San Francisco https://events.bizzabo.com/imagecon2017

UPCOMING EVENTS

Page 59: Cloudinary Webinar Responsive Images

Q & A