[whatwg] The src-N proposal

Bruno Racineux bruno at hexanet.net
Fri Nov 8 15:52:31 PST 2013


On 11/8/13 10:46 AM, "Rafael Rinaldi" <rafael.rinaldi at gmail.com> wrote:

>It looks complex because it tries to solve something complex. I think
>there¹s no way to avoid verbosity to solve such thing.

The only way to avoid verbosity on every <img> element would be to
predefine a relationship between the names/keywords of your images and
their respective sizes, ONCE in the <head>. The browser can then
substitute the img suffix to get the right image, without having to
spell-out the full image name every time.

Or have the browser figure out what sizes are available based on
predictable <img> names such as "image-name-WxH.jpg".

I was going to suggest this with early specs definitions as a complement
to "srcset" last July, but that email is still sitting in my drafts...

Is this an idea browser implementors would even entertain?





More information about the whatwg mailing list