[whatwg] Implementation complexity with elements vs an attribute (responsive images)

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Sun May 13 05:19:16 PDT 2012

On Sun, May 13, 2012 at 12:26 PM, David Goss <dvdgoss at gmail.com> wrote:
> As I understand it, the <img srcset> syntax would
> have to keep getting extended every time we wanted to test a different
> property.

It doesn't "test" anything. It tells the UA metadata about the image
set it would otherwise have to obtain by downloading them all.

UAs can pick the right image based on this metadata plus what they
know about dimensions and orientation of some container, pixel
density, and connectivity.

It would need to get extended if we learnt of further image metadata
we needed to expose to UAs to help them pick the optimal download
(maybe MIME type).

Media queries test client properties, but this syntax is attempting to
describe an image. If we were trying to avoid reinventing wheels at
all costs, we'd want to look at an image description vocabulary like


Benjamin Hawkes-Lewis

More information about the whatwg mailing list