Skip to content

fix(preprod): Remove native lazy loading from LazyImage component#115922

Merged
NicoHinderling merged 1 commit into
masterfrom
fix/remove-lazy-loading-from-snapshot-images
May 20, 2026
Merged

fix(preprod): Remove native lazy loading from LazyImage component#115922
NicoHinderling merged 1 commit into
masterfrom
fix/remove-lazy-loading-from-snapshot-images

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

Remove loading="lazy" and decoding="async" from the LazyImage component
in the snapshot diff view.

LazyImage already manages its own visibility via loaded state and
opacity: 0 positioning — it renders the <img> immediately but hides it
until onLoad fires. Stacking the browser's native loading="lazy" on top
caused the browser to defer fetching images it considered off-screen (inside
scrollable containers with opacity: 0), so the onLoad event never fired
and base images stayed blank.

Introduced in #115836.

The LazyImage component already manages its own visibility with loaded
state and opacity:0 positioning. Stacking the browser's native
loading="lazy" on top caused images to never trigger their load event
in scrollable containers, leaving base images blank.

Co-Authored-By: Claude <noreply@anthropic.com>
@NicoHinderling NicoHinderling requested a review from a team as a code owner May 20, 2026 18:11
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.57%

@NicoHinderling NicoHinderling merged commit 6906411 into master May 20, 2026
72 checks passed
@NicoHinderling NicoHinderling deleted the fix/remove-lazy-loading-from-snapshot-images branch May 20, 2026 20:29
JonasBa pushed a commit that referenced this pull request May 21, 2026
…15922)

Remove `loading="lazy"` and `decoding="async"` from the `LazyImage`
component
in the snapshot diff view.

`LazyImage` already manages its own visibility via `loaded` state and
`opacity: 0` positioning — it renders the `<img>` immediately but hides
it
until `onLoad` fires. Stacking the browser's native `loading="lazy"` on
top
caused the browser to defer fetching images it considered off-screen
(inside
scrollable containers with `opacity: 0`), so the `onLoad` event never
fired
and base images stayed blank.

Introduced in #115836.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants