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] Interaction with progressively loading images #1403
Thanks, this is not clear enough in the explainer.
Existing script-based implementations commonly preload the final image and wait for img.decode() before replacing or revealing it. I think the native proposal should follow the same model when the preview is displayed.
If the preview becomes ready first, it is displayed and remains visible until the final image is completely available and decoded for presentation. The final image then replaces the preview in one step.
If the final image produces paintable content before the preview is displayed, the browser displays that content and permanently skips the preview. Progressive or incremental updates then render normally.
I’ll update the explainer to make this behavior explicit.
I’ve revised the behavior in my earlier reply, mainly to align it with the independent CSS styling sketch. That design can style waiting content, previews, and the main image, including when no preview is provided. A choice to wait for a complete decoded first frame should therefore apply consistently to both waiting-to-image and preview-to-image handoffs, rather than being imposed only when a preview appears.
Waiting for a complete frame may be preferable for some effects, but not every loading experience. The core now preserves native presentation timing, while the exploratory image-reveal sketch separates that timing choice from styling. The mechanism is still open for discussion.
Activity
ogerchikov commentedon Oct 2, 2026
Thanks, this is not clear enough in the explainer.
Existing script-based implementations commonly preload the final image and wait for
img.decode()before replacing or revealing it. I think the native proposal should follow the same model when the preview is displayed.If the preview becomes ready first, it is displayed and remains visible until the final image is completely available and decoded for presentation. The final image then replaces the preview in one step.
If the final image produces paintable content before the preview is displayed, the browser displays that content and permanently skips the preview. Progressive or incremental updates then render normally.
I’ll update the explainer to make this behavior explicit.
Clarify preview-to-final image handoff behavior (#1414)
ogerchikov commentedon Nov 7, 2026
I’ve revised the behavior in my earlier reply, mainly to align it with the independent CSS styling sketch. That design can style waiting content, previews, and the main image, including when no preview is provided. A choice to wait for a complete decoded first frame should therefore apply consistently to both waiting-to-image and preview-to-image handoffs, rather than being imposed only when a preview appears.
Waiting for a complete frame may be preferable for some effects, but not every loading experience. The core now preserves native presentation timing, while the exploratory image-reveal sketch separates that timing choice from styling. The mechanism is still open for discussion.
Reopenning the issue.