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

Re: [whatwg] Implementation complexity with elements vs an attribute (responsive images)

From: Bjartur Thorlacius <svartman95@gmail.com>
Date: Sun, 13 May 2012 19:55:08 +0000
Message-ID: <CAOKKrgM+k1uo2QCNkkWKx7w5Vv=N2DibJoAGGrWrSEpLyeh9Fw@mail.gmail.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: whatwg@lists.whatwg.org
On 5/13/12, Kornel Lesiński <kornel@geekhood.net> wrote:
> I think layout (media queries) and optimisation cases are orthogonal and
> it would be a mistake to do both with the same mechanism.
My knee-jerk reaction to the above thought is that layout should be
done using CSS and any optimizations left up to the UA. A bandwidth
constrained UA could request a downsized thumbnail that fits the size
of the <object>/<img>/<video poster>/<a> element, or render an
appropriately sized bitmap from a SVG.

The problem with that, though, is that then bandwidth constraints
can't affect layout. Users should be able to configure UAs to use
downsized images even given a large viewport, if only to save
bandwidth and reserve a larger fraction of the viewport for text

> Adaptation of images to the layout is page-specific. Adaptation of images
> to bandwidth/screen is UA/device-specific.
Quite. But the latter just might affect the layout.

> Author is in the best position to adapt image to page layout. User-agent
> is in the best position to determine speed/quality trade-offs.
But low-res images usually don't look too good when upscaled. Thus few
pixels should mean small image, UAs mustn't default to pixelation.

> Media queries MUST be interpreted exactly as author specified them.
Thus we mustn't force UAs to pretend to render to small viewports to
find low-res images. That would have unwieldy side-effects.

> User-agents need freedom to choose image resolution based on open set of
> factors, many of which are details authors should not have to think about
> (presence in cache, cost of bandwidth, available memory, external
> displays, etc.)
But the chosen image resolution might be a factor for choosing layout.
Received on Sunday, 13 May 2012 19:55:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:42 UTC