You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Image Preview for HTML Images] Trying to understand the user need #1401
This functionality is already possible via several different means.
Those means appear well adopted by the community.
The proposal allows for a specific attribute - which makes the functionality more easily exposed in the DOM (and therefore to JS, CSS, etc)
Is there a sense of how many sites use placeholders? If so, are they mainly using one technique or another? I'm a big fan of "paving the cowpaths"; trying to get people to change their long-established habits is difficult.
You say "a preview represents the image's content rather than its presentation" - I think I lightly disagree. A blur is a representation of how it will look; not the semantic content of the image.
My other concern is alt text. At the moment, if I am on a slow connection and an image hasn't loaded, my browser shows the alt text as a placeholder until the image is loaded. If previewsrc loads quickly, I won't see the semantic content of the image - all I'll get is the low resolution version which may not be as useful as the alt text.
If this goes ahead, I think I'd prefer "poster" to keep it inline with the <video> element.
This delivers a blurhash in ~1.8 kB, builds to a structured preview in ~6 kB, and keeps building from there.
It isn't clear to me what value previewsrc offers over this, unless the image is inlined.
The explainer has this reasoning around why progressive images aren't good enough for this:
They do not replace every preview use case:
Intermediate quality and paint timing depend on the format, encoding parameters, decoder, and browser.
AVIF provides full control over this. AVIF progressive rendering isn't supported in Firefox and Safari, but this is fixable.
A site cannot provide a separately generated semantic preview, compact hash, or differently processed placeholder independently of the final resource.
AVIF gives you full control over the progressive layer's appearance. It's not an independent resource, but I'm struggling to see why that's a bad thing.
A site's final-image format or image CDN might not support predictable progressive rendering.
The two best image formats we have, JPEG XL and AVIF, support progressive rendering. The CDN may not support previewsrc either.
Changing the final source because of responsive selection, art direction, or application state also changes the progressive stream.
Again, it isn't clear to me why that's a bad thing.
Reacted by Iacopo Moles, James Frost and Tobias Fedder
Activity
jakearchibald commentedon Sep 23, 2026
For comparison, here's a demo of what progressive images can do:
This example is AVIF (only works in Chrome): https://random-stuff.jakearchibald.com/apps/partial-img-decode/?demo=red-panda-progressive-post-blur.avif&density=2
Here, the format delivers a recognisable preview in about 1.7 kB.
Alternatively: https://random-stuff.jakearchibald.com/apps/partial-img-decode/?demo=red-panda-progressive-post-blur-better.avif&density=2
This delivers a better preview in 3.6 kB.
Here's JPEG XL (only in Firefox & Chrome nightly) https://random-stuff.jakearchibald.com/apps/partial-img-decode/?demo=red-panda-progressive.jxl&density=2.
This delivers a blurhash in ~1.8 kB, builds to a structured preview in ~6 kB, and keeps building from there.
It isn't clear to me what value
previewsrcoffers over this, unless the image is inlined.The explainer has this reasoning around why progressive images aren't good enough for this:
AVIF provides full control over this. AVIF progressive rendering isn't supported in Firefox and Safari, but this is fixable.
AVIF gives you full control over the progressive layer's appearance. It's not an independent resource, but I'm struggling to see why that's a bad thing.
The two best image formats we have, JPEG XL and AVIF, support progressive rendering. The CDN may not support
previewsrceither.Again, it isn't clear to me why that's a bad thing.
Revise Image Preview inputs, responsive support, and lifecycle (#1436)
ogerchikov commentedon Nov 7, 2026
I’ve added a developer-needs document that I hope helps address some of the concerns here, with examples and supporting evidence behind the proposal.