Native Responsive Images
dev.opera.com
dev.opera.com
src="cat_500px.jpg" srcset="cat_750px.jpg 1.5x, cat_1000px.jpg 2x"
Does anyone know if the browser will download a higher-res image once the user zooms in? E.g., in Chrome on OSX, if I zoom from 100% to 130% on a non-Retina display, will it download the 1.5x version and downsample it? Likewise, in iOS, if the initial zoom setting is "zoomed out", and "retina" is almost meaningless from a web perspective because people are zooming in and out all the time, what will be downloaded?I've never really understood the attention paid to exact pixel alignment, and retina versions of images, when zoom levels are all over the place these days on all sorts of devices.
Honestly, I need to support retina screens for mobile and desktop. For non-retina screens getting a larger image doesn't really matter. Non retina mobile devices are rapidly disappearing. So therefore I'm comfortable delivering higher resolution images to all devices.
I optimize our images by making them as small as possible and using lazy loading. These two techniques are more than adequate to suit out needs right now.
I am (loosely) of the opinion right now that this is an answer in search of a problem.
An example I just tried was 38kb at 1x and 105kb at 2x
Must be nice to only have big-city first-worlders as users :)
Unless something's changed since the last time I looked, media queries are only screenwise so they don't gracefully handle having a block in a small sidebar versus a "central" content section. The sidebar images could actually grow from a big to a small screen (because content is linearised and the "sidebar image" now takes the whole width of a small display, rather than a small part of a big display)
Pictures are they only problem that needs to be solved at this point.
Can anyone provide more details of what they're talking about? I'm actually not too interested in naming names of browser vendors (which they were trying to avoid clearly) -- I'm more interested in details of the 'bad experiences', what was it (some people) thought went wrong with what particular aspects or areas of con-neg-based solutions in the past?
There are various people in various vendors (Mostly Mozilla and Apple) that oppose conneg based solutions. I didn't mean to be vague, just didn't think it's very interesting :)
It's important to note that the opposition is not unanimous, and things may change in the future.
What's interesting to some is not to others. :) You could add a link to that doc from the relevant sentence if you wanted, woo, the web.
But image formats are hard, since they require an eco system, investment from large cos, etc. Maybe in a few years...
> A subset video bitstream is derived by dropping packets from the larger video to reduce the bandwidth required for the subset bitstream. The subset bitstream can represent a lower spatial resolution (smaller screen), lower temporal resolution (lower frame rate), or lower quality video signal.
Inventing a new protocol if the problem can be solved by serving the proper markup, seems misguided.
And what does the "calc(33vw - 100px)" do, apparently in void context?
Somehow I feel more confused after reading the article.
Google has a first-class definition, too: https://www.google.com/search?q=css+vw+unit
The `calc()` function is a CSS function that lets you calculate values like 100vw - 100px, similar to what you can do in JavaScript. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/calc