Skip to content

Clarify preview-to-final image handoff behavior - #1414

Merged
Alex Russell (slightlyoff) merged 2 commits into
MicrosoftEdge:mainfrom
ogerchikov:interaction-with-partially-loaded-images
Oct 4, 2026
Merged

Alex Russell (slightlyoff) merged 2 commits into
MicrosoftEdge:mainfrom
ogerchikov:interaction-with-partially-loaded-images

Conversation

@ogerchikov

Copy link
Copy Markdown
Member

Clarifies when the browser replaces an image preview with the final image, specifically how partially decoded final images are handled.
Addresses the handoff concerns raised in #1403.

@ogerchikov Olga Gerchikov (ogerchikov) added the Image Preview Issues tracking Image Preview API proposal label Oct 3, 2026
@ogerchikov
Olga Gerchikov (ogerchikov) marked this pull request as ready for review October 3, 2026 00:11
@jakearchibald

Copy link
Copy Markdown

This still seems really ambiguous. Stuff like "if the final image produces content" suggests much earlier than you intend.

If I understand correctly, I think the timing you're wanting is when the first frame is completely available (still images are a single frame).

Fwiw I also think the term "final image" is confusing, given src can change, and it's a little ambiguous when it comes to animations.

@ogerchikov

Copy link
Copy Markdown
Member Author

Thanks, I updated the explainer to make the two cases clearer (hopefully :)).

Before the preview is displayed, the browser checks whether the preview or the selected image becomes ready to paint first. If the selected image is ready first, even if it is only partially decoded, the preview is skipped and progressive or incremental rendering continues normally.

If the preview is displayed first, it remains visible until the selected image’s first frame is completely available and decoded for presentation. For a still image, that means the complete image; for an animated image, it does not require every frame to be decoded.

I also replaced “final image” with “selected image” and defined it as the resource selected from src, srcset, or <picture> for the current image generation.

@jakearchibald

Copy link
Copy Markdown

This seems less ambiguous. I'm not sure I agree with it, thinking of cases where just the first line of pixels can be rendered, but I guess that's for another issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slightlyoff

Copy link
Copy Markdown
Contributor

Merging for visibility. We can address Jake Archibald (@jakearchibald)'s partial image comcern in a follow-up.

@slightlyoff
Alex Russell (slightlyoff) merged commit aebb1fd into MicrosoftEdge:main Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Image Preview Issues tracking Image Preview API proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants