Compatibility RiskThe specification is a working draft published 2 months ago. The feature has a popular polyfill used by numerous large sites. Other browser vendors haven't yet expressed intentions to implement the specification.
Isn't <picture> redundant with <img> and image-set? What am I missing?
image-set and <picture> can be seen as two concurring proposals for a similar/the same goal.
On Apr 21, 2013, at 8:23 PM, Darin Fisher <da...@chromium.org> wrote:
> Isn't <picture> redundant with <img> and image-set? What am I missing?
On Sun, Apr 21, 2013 at 8:52 PM, Dirk Schulze <dsch...@chromium.org> wrote:
image-set and <picture> can be seen as two concurring proposals for a similar/the same goal.
On Apr 21, 2013, at 8:23 PM, Darin Fisher <da...@chromium.org> wrote:
> Isn't <picture> redundant with <img> and image-set? What am I missing?
Given that we're already shipping image-set, we'd need significant use-cases to justify also shipping <picture>. The spec draws a comparison to srcset as well, stating that <picture> is needed to meet some responsive image use-cases that srcset doesn't meet, but doesn't give specifics. Are there use-cases that aren't met by some combination of srcset, CSS media queries and image-set? Is the only non-syntatic difference that the UA is not allowed to pick which resource it wants to use with <picture>?
Regarding the specific HTMLPreloadScanner issue you're raising, I believe we can use the same technique used in https://codereview.chromium.org/13945017/ to enable `media` attribute based preloading without giving the PreloadScanner the ability to evaluate MQs. I have working code that does that, and I'll submit it for review shortly.
Are there are other aspects of <picture> support that may affect Core's future improvement?
Any true responsive images solution will require some form of MQ evaluation (at least a subset of the range of possible MQs) in order to preload only the required resources. I can't evaluate the future costs, but I think the value of a responsive images native solution is significant, since 60% of traffic is images and a large portion of that traffic can be saved on lower resolution devices.
On Mon, Apr 22, 2013 at 9:53 AM, Yoav Weiss <yo...@yoav.ws> wrote:Any true responsive images solution will require some form of MQ evaluation (at least a subset of the range of possible MQs) in order to preload only the required resources. I can't evaluate the future costs, but I think the value of a responsive images native solution is significant, since 60% of traffic is images and a large portion of that traffic can be saved on lower resolution devices.
There are a number of competing proposals in this area, and it's not clear to me yet which ones make the best trade-offs. For example, <https://github.com/igrigorik/http-client-hints> is a proposal for using HTTP content negotiation rather than media queries to address these use cases.I know there are many pros and cons to these different proposals and there have been epicly long threads in the W3C on these topics. I'd like to try to avoid starting a long debate weighing the pros and cons on this mailing list. It's better to have that conversation in the W3C with other implementers participating.
My understanding of the discussion is that <picture> differs from
image-set in that it uses arbitrary media queries, which is
significantly more complicated than image-set. This increases the
implementation complexity.
You implementation was nice, btw, but highlights the added complexity
in the preload scanner. I believe mis-nested <picture> tags could
confuse your current implementation into ignoring preloads for the
rest of the document?
Since "intent to implement" emails are more advisory than
permission-seeking, I would take the "NOT LGTM" as just a strong
signal that at current you're going to have a difficult time finding
OWNERS to "lgtm" your patch (rather than a final decision that Blink
will never implement this).
I think we should focus on making our current implementations of
srcset and image-set awesome enough to answer developer's (and any
current polyfill's) needs and re-consider adding <picture> if the
landscape changes.
Isn't <picture> redundant with <img> and image-set? What am I missing?
On Monday, 22 April 2013 04:23:34 UTC+1, Darin Fisher wrote:Isn't <picture> redundant with <img> and image-set? What am I missing?
One use for <picture> is to allow devs to send webP images to capable browsers, with fallback to PNG/ whatevs for non-webP browsers (I expound more at http://www.brucelawson.co.uk/2013/save-bandwidth-webp-with-fallback/) .