[webkit-dev] The SrcN responsive images proposal
benjamin at webkit.org
Wed Nov 6 18:32:15 PST 2013
On 11/6/13, 3:24 PM, Yoav Weiss wrote:
> On Wed, Nov 6, 2013 at 11:33 PM, Benjamin Poulain <benjamin at webkit.org
> <mailto:benjamin at webkit.org>> wrote:
> On 11/6/13, 10:53 AM, John Mellor wrote:
> On Sun, Oct 20, 2013 at 2:00 AM, Maciej Stachowiak
> <mjs at apple.com <mailto:mjs at apple.com>
> <mailto:mjs at apple.com <mailto:mjs at apple.com>>> wrote:
> > My initial impression is that it seems a bit overengineered.
> I sympathize. The issue of srcN appearing to be a complex
> solution to a
> seemingly simple problem came up again on IRC chatting to rniwa,
> so I
> thought I'd try to explain this briefly.
> Unfortunately, responsive images is a deceptively complex
> problem. There
> are 3 main use cases:
> 1. dpr-switching: fixed-width image resolution based on
> 2. viewport-switching: flexible-width image resolution based on
> width and devicePixelRatio.
> 3. art direction: same as #1 or #2, except additionally, must serve
> completely different images based on viewport width.
> How important and common are each of those use cases?
> Handling every imaginable use case by the Engine is a non-goal.
> There has been a lot of demand for dpr-switching since the first
> iPad Retina. This has caused some very ugly hacks on the Web. It is
> very important to address that issue.
> Viewport switching is usually done to adapt images for mobile device
> VS large/huge display devices. It is a valid concern but it is not
> easily addressed. Srcset can/should likely be improved regarding this.
> I believe (feel free to prove me wrong) dynamic viewport adaptation
> and what you call "art direction" is not as common.
> On a survey ran at the last Mobilism conference (and on Twitter) 41% of
> respondents said they're already using some hack to get their responsive
> image "art-directed".
> A manual responsive site survey
> <http://japborst.net/blog/the-current-state-of-art-direction.html> showed that
> 23% of the sites "art-direct" their images, and 58% do that when
> (subjectively) the design requires it.
> So it might not be as common as viewport switching (which is practically
> everywhere), but it is pretty common.
The survey you linked
targeting specifically responsive websites. Those websites represents
only an unquantified subset of the web.
Even with that very targeted subset, only a small percentage was
actually implementing art-direction.
It looks to me like art-direction should not be imposing all the design
constraints over the more important use cases.
Something that is still unclear to me is why srcN would be doing a
There are many complex cases that are handled dynamically (changing
images on zoom; tiling large images on zoom; changing layout on
rotation; creating popover style layout when switching
More information about the webkit-dev