155
AUSTIN WORDPRESS 2015 ADAPTIVE IM A G ES IN RESPONSIVE WEB DESIGN CHRISTOPHER SCHMITT @teleject

[Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Embed Size (px)

Citation preview

Page 1: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

AUSTIN WORDPRESS 2015

ADAPTIVE IMAGES IN RESPONSIVE WEB DESIGN

CHRISTOPHER SCHMITT @teleject

Page 2: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

CHRISTOPHER SCHMITT@teleject

Page 3: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

@teleject

Page 4: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

@teleject

Responsive Media Course http://goo.gl/fKgZ6I

Page 5: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

@teleject

http://CSSDevConf.com/

Page 6: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

@teleject

http://JavaScriptSummit.com/

Page 7: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 8: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 9: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 10: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 11: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 12: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

y

x

Page 13: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 14: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 15: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 16: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://cssspecificity.com

Page 17: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://cssspecificity.com

Page 18: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://cssspecificity.com

Page 19: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WHY DON’T WE ASK THE BROWSER?

(cc) flic.kr/p/vUBHv

Page 20: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

alert("User-agent header sent: " + navigator.userAgent);

Page 21: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

alert("User-agent header sent: " + navigator.userAgent);

Page 22: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Mozilla/1.0 (Win3.1)

http://www.useragentstring.com/

(cc) flic.kr/p/vUBHv

Page 23: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Mozilla/1.0 (Win3.1)Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)

(cc) flic.kr/p/vUBHv

http://www.useragentstring.com/

Page 24: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3

(cc) flic.kr/p/vUBHv

http://www.useragentstring.com/

Page 25: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3http://webaim.org/blog/user-agent-string-history/

(cc) flic.kr/p/vUBHv

Page 26: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

https://github.com/igrigorik/http-client-hints

Page 27: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FEATURE TESTINGvs. BROWSER SNIFFING

1

2

3

Page 28: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FEATURE TESTINGvs. BROWSER SNIFFING

1 Browser width

2

3

Page 29: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

A scripting approach var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement &&

( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

//IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; }

http://www.howtocreate.co.uk/tutorials/javascript/browserwindow

Page 30: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

The jQuery approach

// returns width of browser viewport $(window).width(); // returns height of browser viewport $(window).height();

// returns width of HTML document $(document).width(); // returns height of HTML document $(document).height();

http://api.jquery.com/width/ & http://api.jquery.com/height/

Page 31: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

CSS media queries

// default, mobile-1st CSS rules devices go here

@media screen and (min-width: 480px) { ... }

@media screen and (min-width: 600px) { ... }

@media screen and (min-width: 768px) { ... }

@media screen and (min-width: 910px) { ... }

Page 32: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

(cc) flic.kr/p/8Lo5Gk

Page 33: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

BROWSER WIDTH GIVES US FRAME, NOT THE CANVAS

Page 34: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FEATURE TESTINGvs. BROWSER SNIFFING

1 Browser width

2 Screen resolution

3

Page 35: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

72PPIHAS

(cc) flic.kr/p/6tjjRP

Page 36: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

72 points-per-inch = 72 pixels-per-inch

Page 37: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

96PPIIF A

Page 38: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

72 points-per-inch x [1+(1/3)] = 96 PPI

Page 39: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

78μm

goo.gl/zpkFy78μm

“RETINA” DISPLAYS300ppi at 12 inches from the eyes

Page 40: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 41: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

[In 2013, Intel sees their product line] offer a higher resolution experience than a top-of-the-line 1080p HDTV.”

http://liliputing.com/2012/04/intel-retina-laptop-desktop-displays-coming-in-2013.html

Page 42: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 43: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

72 PPI

Page 44: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

240

Page 45: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

240 PPI

Page 46: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

240 PPI

Page 47: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

72 PPI

Page 48: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 49: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

RETINA DISPLAYS = LARGER IMAGES, LARGER FILE SIZES

Page 50: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FEATURE TESTINGvs. BROWSER SNIFFING

1 Browser width

2 Screen resolution

3 Bandwidth

Page 51: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

(cc) flic.kr/p/4DziUN

SPEED TESTS HINDER SPEED, USER EXPERIENCE

Page 52: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Testing for speed of an internet connection is like stepping in front of a car to see how fast it is.”

(cc) flic.kr/p/4DziUN

Page 53: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Testing for speed of an internet connection is like stepping in front of a car to see how fast it is.”

“But, Christopher, you only have to test it once.”“

(cc) flic.kr/p/4DziUN

Page 54: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Speed test image

https://github.com/adamdbradley/foresight.js

Page 55: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Speed test image

+50k

https://github.com/adamdbradley/foresight.js

Page 56: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Native speed test

// @Modernizr's network-connection.js connection = navigator.connection || {

type: 0 }, // polyfill

isSlowConnection = connection.type == 3 || connection.type == 4

| /^[23]g$/.test(connection.type);

http://davidbcalhoun.com/2010/using-navigator-connection-android

Page 57: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FEATURE TESTINGvs. BROWSER SNIFFING

1 Browser width

2 Screen resolution

3 Bandwidth

Page 58: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IMGGIMME THAT OLD SCHOOL

1

2

3

Page 59: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

1 srcset & sizes

2

3

IMGGIMME THAT OLD SCHOOL

Page 60: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img src="headshot_500px.jpg" srcset="headshot_650px.jpg 1.5x, headshot_1000px.jpg 2x" width="500" alt="Headshot">

http://caniuse.com/#search=srcset

Page 61: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 62: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img sizes="(max-width: 30em) 100vw, (max-width: 50em) 50vw" srcset="swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">

https://dev.opera.com/articles/native-responsive-images/

Page 63: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img sizes="(max-width: 30em) 100vw, (max-width: 50em) 50vw" srcset="swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">

https://dev.opera.com/articles/native-responsive-images/

Page 64: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img sizes="(max-width: 30em) 100vw, (max-width: 50em) 50vw" srcset="swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">

https://dev.opera.com/articles/native-responsive-images/

Page 65: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img sizes="(max-width: 30em) 100vw, (max-width: 50em) 50vw" srcset="swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">

https://dev.opera.com/articles/native-responsive-images/

Page 66: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Basic Image Swap

<img sizes="(max-width: 30em) 100vw, (max-width: 50em) 50vw” srcset="swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">

https://dev.opera.com/articles/native-responsive-images/

Page 67: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IT’S STILL UP TO BROWSER TO PICK WHICH IMAGE TO USE

Page 68: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

BUT WILL USE THESE ATTRIBUTES 1,000% OF THE TIME*

* Science

Page 69: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

1 srcset & sizes

2 <picture>

3

GIMME THAT OLD SCHOOLIMG

Page 70: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 71: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 72: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<picture>

<img src="small.jpg" alt=“That awesome Saints’ touchdown.">

Page 73: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<picture>

<picture> <source media="(min-width: 45em)" srcset="large.jpg"> <source media="(min-width: 32em)" srcset="cropped.jpg"> <img src="small.jpg" alt=“That awesome Saints’ touchdown."> </picture>

25+38+ 33+ ? ?

Page 74: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<picture>

<picture> <source media="(min-width: 45em)" srcset="large.jpg"> <source media="(min-width: 32em)" srcset="cropped.jpg"> <img src="small.jpg" alt=“That awesome Saints’ touchdown."> </picture>

25+38+ 33+ ? ?

Page 75: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<picture>

<picture> <source media="(min-width: 45em)" srcset="large.jpg"> <source media="(min-width: 32em)" srcset="cropped.jpg"> <img src="small.jpg" alt=“That awesome Saints’ touchdown."> </picture>

25+38+ 33+ ? ?

Page 76: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<picture>

<picture> <source media="(min-width: 45em)" srcset="large.jpg"> <source media="(min-width: 32em)" srcset="med.jpg"> <img src="small.jpg" alt=“That awesome Saints’ touchdown."> </picture>

25+38+ 33+ ? ?

Page 77: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

USE <PICTURE> POWER TO SOLVE ART DIRECTION

Page 78: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

& ONLY WHEN ALL OTHER CSS-y OPTIONS HAVE BEEN EXPLORED

Page 79: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 80: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://responsivedesign.is/resources/images/picture-fill

Page 81: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

https://wordpress.org/plugins/ricg-responsive-images/

Page 82: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

https://wordpress.org/plugins/ricg-responsive-images/

Page 83: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

1 srcset & sizes

2 <picture>

3 HiSRC and others

GIMME THAT OLD SCHOOLIMG

Page 84: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

SERIES OF CHECKS TO FIND OUT RESPONSIVE PATH FOR IMAGES...

Page 85: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

DO NATIVE SPEED TEST FOR MOBILE DEVICES FIRST...

http://davidbcalhoun.com/2010/using-navigator-connection-android

Page 86: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

$.hisrc.devicePixelRatio = 1; if(window.devicePixelRatio !== undefined) {

$.hisrc.devicePixelRatio = window.devicePixelRatio

};

Check pixel density...

https://gist.github.com/2428356

Page 87: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

+50k

https://github.com/adamdbradley/foresight.js

Force speed test

Page 88: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

LESS THAN 4G MEANS MOBILE IMAGES LEFT IN PLACE

Page 89: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

BETWEEN 4G &300 Kbps MEANS REGULAR DESKTOP IMAGES SWAPPED IN

Page 90: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

FAST SPEED & HIGH DENSITY, RETINA IMAGES SWAPPED IN

https://github.com/crdeutsch/hisrc/tree/v2

Page 91: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://css-tricks.com/which-responsive-images-solution-

should-you-use/

Page 92: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

24+http://css-tricks.com/which-responsive-images-solution-

should-you-use/

Page 93: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://css-tricks.com/which-responsive-images-solution-

should-you-use/

ALL SOLUTIONS HAVE 2x +

Page 94: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WORKAROUNDS TRICKS in CONTEXT

1

2

3

&

(cc) flic.kr/p/64fGf6

Page 95: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WORKAROUNDS TRICKS

1 background-size: 100%

2

3

&

(cc) flic.kr/p/64fGf6

Page 97: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

background-size: 100%<a href="example.com/link">Download on Github</a>

.download a { padding: .095em .8em; background: url(../img/arrow.png) no-repeat; background-size: 100%; margin-left: .4em; -webkit-transition: margin 0.15s ease-out; -moz-transition: margin 0.15s ease-out; text-decoration: none;

}

9+5+9+ 11.6+17+

Page 98: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WORKAROUNDS TRICKS in CONTEXT

1 background-size: auto

2 SVG

3

&

(cc) flic.kr/p/64fGf6

Page 99: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

SVG

Page 100: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 101: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 102: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Native SVG

http://caniuse.com/#search=SVG%20in%20HTML%20img%20element

Page 103: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

PNG SVG

9+5+9+ 11.6+17+

Page 104: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://petercollingridge.appspot.com/svg-optimiser

Page 107: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Modernizr checkif(!Modernizr.svg){ var images = document.getElementsByTagName("img"); for(var i = 0; i < images.length; i++){ var src = images[i].src.split("."); images[i].src = src[0] + ".png"; } }

http://stackoverflow.com/questions/12846852/svg-png-extension-switch

Page 108: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

https://github.com/filamentgroup/grunticon/

Page 109: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

https://wordpress.org/plugins/scalable-vector-graphics-svg/

Page 110: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WORKAROUNDS TRICKS in CONTEXT

1 background-size: auto

2 SVG

3 font-based solutions

&

(cc) flic.kr/p/64fGf6

Page 111: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

...if you use <meta charset="utf-8"> (you should be for HTML5), you’re adding common Unicode characters like ♫ and ✆, and you don’t need a specific font’s version... just copy and paste them into your HTML.”

Page 112: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 113: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 114: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 115: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Font-based RWD

http://ilovetypography.com/2012/04/11/designing-type-systems/

Page 116: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Font-based RWD

http://ilovetypography.com/2012/04/11/designing-type-systems/

avg file size 40kb

Page 117: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://css-tricks.com/examples/IconFont/

Page 120: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Font-based icons

<style> [data-icon]:before { font-family: 'icon-font'; content: attr(data-icon); } </style>

<a href="http://example.com/cloud/save/"> <span data-icon="C" aria-hidden="true"></span> Save to Cloud </a>

Page 121: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

WORKAROUNDS TRICKS in CONTEXT

1 background-size: 100%

2 SVG

3 font-based solutions

&

(cc) flic.kr/p/64fGf64 compressed JPEGs

Page 122: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 123: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 124: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 125: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 126: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

iCloud iOS 5 OSX Lion iPad 2 iPhone

OSThe world’s most advanced desktop operating system advances even further.

With over 250 new features including Multi-Touch gestures, Mission Control, full-screen apps, and Launchpad, OS X Lion takes the Mac further than ever.

Learn More

X Lion

Page 127: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

iCloud iOS 5 OSX Lion iPad 2 iPhone

OSThe world’s most advanced desktop operating system advances even further.

With over 250 new features including Multi-Touch gestures, Mission Control, full-screen apps, and Launchpad, OS X Lion takes the Mac further than ever.

Learn More

X Lion!

" ←↑

Page 128: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

iCloud iOS 5 OSX Lion iPad 2 iPhone

OSThe world’s most advanced desktop operating system advances even further.

With over 250 new features including Multi-Touch gestures, Mission Control, full-screen apps, and Launchpad, OS X Lion takes the Mac further than ever.

Learn More

X Lion! ↙

" ← ←↗ ↑ ↖

↑ ↖

Page 129: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

(cc) flic.kr/p/64fGf6

Page 130: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 131: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

446kb < 8,755.2kb

(cc) flic.kr/p/64fGf6

0% vs 100%

Page 132: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Size Type Dimensions Display Px Density File Size

Extreme 2276x1400 1x & 2x 446kb

Extra Large

1024x1536 2x 1,745kb

512x768 1x 503kb

Large640x960 2x 746kb

320x480 1x 223kb

Medium500x750 2x 485kb

250x375 1x 145kb

Page 133: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

Size Type Dimensions Display Px Density File Size

Extreme 2276x1400 1x & 2x 446kb

Extra Large

1024x1536 2x 1,745kb

512x768 1x 503kb

Large640x960 2x 746kb

320x480 1x 223kb

Medium500x750 2x 485kb

250x375 1x 145kb

Page 134: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<img src="rock-climber.jpg" alt="" />

One Image, One IMG

Page 135: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

(cc) flic.kr/p/64fGf6

EXTREMELYCOMPRESSED PROBLEMS

Page 136: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 137: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 138: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

(cc) flic.kr/p/64fGf6

COMBO MOVESCLOWN CAR TECHNIQUE + HIGHLY COMPRESSED JPEGS

Page 139: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

<img src="rock-climbing-400px.jpg" srcset="rock-climbing-400px.jpg 400w, rock-climbing-compressed.jpg 600w" sizes="100vw" alt="Mountain Climber" />

http://codepen.io/teleject/full/qpxmr/

Page 140: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

http://codepen.io/teleject/full/qpxmr/

Page 141: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 142: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 143: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IMGGIMME THAT NEW SCHOOL

1

2

3

#rwdimg

Page 144: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IMGGIMME THAT NEW SCHOOL

1

2

3

simple design for users

#rwdimg

1

Page 145: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IMGGIMME THAT NEW SCHOOL

1

2

3

simple design for users

browser, server handshake

#rwdimg

2

Page 146: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

IMGGIMME THAT NEW SCHOOL

1

2

3

simple design for users

browser, server handshake

same, several formats

#rwdimg

3

Page 148: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Page 152: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

#rwdimg

<link rel="shortcut icon" href="/assets/favicon.ico" />

Favicon

Page 153: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

#rwdimg

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144-precomposed.png" />

<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png" />

<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png" />

<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png" />

Mobile iOS Bookmarks

Page 155: [Austin WordPress Meetup] Adaptive Images in Responsive Web Design

THANK YOU! CHRISTOPHER SCHMITT

Sass Summit - http://SassSummit.com