[whatwg] Fw: <img srcset> for responsive bitmapped content images

Ungureanu Dumitru udumitru at yahoo.co.uk
Thu May 17 10:30:18 PDT 2012

----- Forwarded Message -----
From: Ungureanu Dumitru <udumitru at yahoo.co.uk>
To: Julian Reschke <julian.reschke at gmx.de> 
Sent: Thursday, 17 May 2012, 18:52
Subject: Re: [whatwg] <img srcset> for responsive bitmapped content images

Having multiple src's for an image is similar to AJAX for content. Why 
is it a good idea to have a default AJAX for images but not for content, beats me.

 From: Julian Reschke <julian.reschke at gmx.de>
To: Edward O'Connor <eoconnor at apple.com> 
Cc: whatwg at whatwg.org 
Sent: Wednesday, 16 May 2012, 12:22
Subject: Re: [whatwg] <img srcset> for responsive bitmapped content images
On 2012-05-10 09:58, Edward O'Connor wrote:
> Hi,
> When authors adapt their sites for high-resolution displays such as the
> iPhone's Retina display, they often need to be
 able to use different
> assets representing the same image. Doing this for content images in
> HTML is currently much more of a pain than it is in CSS (and it can be a
> pain in CSS). I think we can best address this problem for bitmap[1]
> content image by the addition of a srcset="" attribute to the existing
> <img>  element.
> The srcset="" attribute takes as its argument a simplified variant of
> the image-set() microsyntax[2]. It would look something like this:
> <img src="foo-lores.jpg"
>       srcset="foo-hires.jpg 2x, foo-superduperhires.jpg 6.5x"
>       alt="decent alt text for foo.">
> ...

Inventing a new microsyntax is tricky.

- "comma separated" implies you'll need to escape a comma when it appears in a URI; this may be a problem when the URI scheme assigns a special meaning to the comma (so it
 doesn't affect HTTP but still...)

- separating URIs from parameters with whitespace implies that the URIs are valid (in that they do not contain whitespace themselves); I personally have no problem with that, but it should be kept in mind

Best regards, Julian

More information about the whatwg mailing list