[webkit-dev] Double-Resolution (Retina) Images - Re: -webkit-image-set

Tom Penzer tpenzer at mailcan.com
Mon Apr 23 16:57:15 PDT 2012


On Apr 23, 2012, at 3:42 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On what standard mailing lists have this idea been proposed or discussed?

I have not yet submitted to w3.org public-html or public-html-comments as I wanted to get the take of the webkit community first, since you guys are particularly interested in this issue.


> Again, what makes us think that we won't need background-image-3x, background-image-4x, ... in the future? Or maybe background-image-7.5x?

Then maybe a meta 'image-scaling' attribute rather than 2x-specific. The main point is to avoid requiring each image path for the different scales to be explicitly written, when it's likely a standardized variation from the 1x image file path. We should explore ways to codify those variations, instead of making our lives hard.

> Not all images end with ".ext". It could be generated by a server-side script for example. What do we do with them?

Well, if you could think of a way to codify that request in a standardized way, that would certainly be something to consider. Do you think this type of system could be extended to account for such a situation?


> By using this approach, we avoid the need to specify the same list of filenames varying only by 2x-res filename key for every single image asset, which is a bunch of busy work that just seems extremely redundant and clumsy to me. We are also able to achieve the same level of performance for those willing to put in the extra work to flag assets that deviate from the default setting (to minimize requests), and we allow the flexibility to be lazy or wrong, and have the user agent make two requests in those cases. This solution is also completely backwards-compatible with existing browsers. We can revisit whether or not this was really the best approach once 4x displays are out, but it's going to save millions of collective developer-hours in the meantime; remind me to buy future me a beer to make up for it.
> 
> A much better solution would be adding a new http request header, and let the server send back back double resolution images.
> 
> Quite frankly, I don't think we're interested in implementing this proposal.
> 
> - Ryosuke

If that means we don't need to go through and fill out every single file path for every different scale image if there's a file naming system in place, then I'm all for it. I'm just scared we're needlessly making our lives harder than they should be.

-Tom P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120423/20cd4b09/attachment.html>


More information about the webkit-dev mailing list