W3C TAG F2F - London, January 2014
Load properly dimensioned images that fit the page's design in an efficient manner
Not a problem!
Images - over 61%
Up to™ 72% image data savings
tkadlec.comThe difference between low end, small devices and high-end wide devices increases
Sending images that match layout
Provide further context when necessary
<picture>
(2.0) element<source>
- art directionsrcset
- DPR or dimensionssizes
- layout hints <picture>
<source srcset="pic1x.jpg 1x, pic2x.jpg 2x, pic4x.jpg 4x">
<img alt="A rad wolf." src="pic1x.jpg">
</picture>
or simply
<img srcset="pic1x.jpg 1x, pic2x.jpg 2x, pic4x.jpg 4x"
alt="A rad wolf." src="pic1x.jpg">
<picture>
<source media="(min-width: 45em)" srcset="large.jpg">
<source media="(min-width: 18em)" srcset="med.jpg">
<img src="small.jpg" alt="The president giving an award.">
</picture>
<picture>
<source media="(min-width: 45em)" srcset="large-1.jpg, large-2.jpg 2x">
<source media="(min-width: 18em)" srcset="med-1.jpg, med-2.jpg 2x">
<img src="small-1.jpg" srcset="small-1.jpg, small-2.jpg 2x"
alt="The president giving an award.">
</picture>
<picture>
<source sizes="100%"
srcset="pic400.jpg 400w, pic800.jpg 800w, pic1600.jpg 1600w">
<img src="pic400.jpg" alt="The president giving an award.">
</picture>
or simply
<img sizes="100%"
srcset="pic400.jpg 400w, pic800.jpg 800w, pic1600.jpg 1600w"
src="pic400.jpg" alt="The president giving an award.">
<picture>
<source sizes="(max-width: 30em) 100%, (max-width: 50em) 50%,
calc(33% - 100px)"
srcset="pic100.jpg 100w, pic200.jpg 200w, pic400.jpg 400w,
pic800.jpg 800w, pic1600.jpg 1600w, pic3200.jpg 3200w">
<img src="pic400.jpg" alt="The president giving an award.">
</picture>
or simply
<img sizes="(max-width: 30em) 100%, (max-width: 50em) 50%,
calc(33% - 100px)"
srcset="pic100.jpg 100w, pic200.jpg 200w, pic400.jpg 400w,
pic800.jpg 800w, pic1600.jpg 1600w, pic3200.jpg 3200w"
src="pic400.jpg" alt="The president giving an award.">
Implicitly relies on sizes
Server confirmation header
Used for intrinsic image sizing
Not sent on initial HTML request
336x635
106x200
211x400
336x635
770x512
200x200
400x288
770x512
<picture>
RWD - http://www.flickr.com/photos/axbom/6263640150/sizes/o/in/photostream/
Bloat - http://www.flickr.com/photos/lorenjavier/5013332959/sizes/l/in/photostream/
CNN - http://mobile.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/
Wap 2 site - http://www.coffeeshopdave.com/Helio_WAPv2.html
Lego - http://lego.wikia.com/wiki/Service_Crew_Member