W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

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

From: Ungureanu Dumitru <udumitru@yahoo.co.uk>
Date: Thu, 17 May 2012 18:30:18 +0100 (BST)
Message-ID: <1337275818.79321.YahooMailNeo@web171401.mail.ir2.yahoo.com>
To: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>

----- Forwarded Message -----
From: Ungureanu Dumitru <udumitru@yahoo.co.uk>
To: Julian Reschke <julian.reschke@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@gmx.de>
To: Edward O'Connor <eoconnor@apple.com> 
Cc: whatwg@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
Received on Thursday, 17 May 2012 17:30:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC