Short test case if we could use Responsive images in upcoming projects for De Persgroep.
http://bengie.github.io/poc-responsive-images/
Yes, we can. And for mobile your page size will decrease with ±40% (tested on the included pages)
We need a polyfill to make it cross-browser compatible.
- IE9 needs an unsemantic element :
<!--[if IE 9]><video style="display: none;"><![endif]-->
<picture>
is for art direction- You can use any
[length]
value (vw, px, em, ...) forsizes=""
- You will save the end user a lot of bandwidth and thus money
- Your page size will decrease (see table below)
- Browser depends which image it will use depending bandwidth, screen resolution, connection speed, screen density, viewport width, ...
- Thanks to art direction you gain a lot of control
- Bloated HTML
- Inline media queries
- Buggy behaviour in Chrome when using absolute values (px) for
sizes=""
. You need to refresh the page when you switch breakpoints to get the correct image. On initial page load the image is correct. - With the polyfill: No JS = no image, just an
alt=""
attribute - Big initial setup
- Support for IE8
picture
: the fallback syntax needs the larger desktop image so you'll probably end up with an extra media query- same for
sizes=""