Intent to Ship: HTMLImageElement's srcset attribute (DPR switching)

314 views
Skip to first unread message

Yoav Weiss

unread,
Jan 31, 2014, 4:38:38 PM1/31/14
to blink-dev

Primary eng (and PM) emails

yo...@yoav.ws


Spec

http://whatwg.org/html#attr-img-srcset


Summary

The `srcset` attribute enables authors to adapt image resources to the device's 
display characteristics. This intent refers to the DPR switching parts (the 'x' descriptor), which have rough consensus around them.

Motivation

New device form factors and screen DPRs are added to the market on a regular basis. Serving the same image resources to all devices (which may display them in differing dimensions and at different DPRs) is wasteful, and hurts Web performance.


This feature will start resolving this problem, by enabling Web authors to specify multiple resources, with varying DPR qualities, and let the browser pick the resource that matches the device's capabilities.


This feature is also a subset of the picture element specification.


Compatibility Risk

Low. 


The feature is implemented in WebKit (but not yet shipped). It's intended to be implemented soon in Gecko as part of the picture element implementation. It is not yet implemented in IE.


The feature's syntax include an inherent fallback mechanism for authors, where non-supporting browsers will simply fetch the resource specified in the `src` attribute. (resulting in a sub-optimal, but fully-functional image)


Ongoing technical constraints

None.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/SVQxmsJRa9c/qfd55y_86HEJ


Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?

Yes.


OWP launch tracking bug?

http://crbug.com/296891

Row on feature dashboard?

Yes.


Requesting approval to ship?

Yes.

Adam Barth

unread,
Jan 31, 2014, 5:41:09 PM1/31/14
to Yoav Weiss, blink-dev
LGTM

I'm glad we're making progress on responsive images and have figured out how to ship various parts incrementally.  Thanks for driving the discussion in the WhatWG and other forums.

Adam

Ilya Grigorik

unread,
Jan 31, 2014, 5:48:47 PM1/31/14
to Adam Barth, Yoav Weiss, blink-dev

On Fri, Jan 31, 2014 at 2:41 PM, Adam Barth <aba...@chromium.org> wrote:
I'm glad we're making progress on responsive images and have figured out how to ship various parts incrementally.  Thanks for driving the discussion in the WhatWG and other forums.

Hearty +1 to that.

Darin Fisher

unread,
Feb 1, 2014, 10:36:46 AM2/1/14
to Yoav Weiss, blink-dev

LGTM

Eric Seidel

unread,
Feb 1, 2014, 1:37:14 PM2/1/14
to Darin Fisher, Yoav Weiss, blink-dev
LGTM.

Yoav Weiss

unread,
Feb 2, 2014, 3:18:42 AM2/2/14
to Eric Seidel, Darin Fisher, blink-dev
CL landed. Thanks all!


Reply all
Reply to author
Forward
0 new messages