Skip to content

[8.2-stable] Remove lazy loading from thumbnail#3847

Merged
tvdeyen merged 2 commits into8.2-stablefrom
backport/8.2-stable/pr-3845
Apr 22, 2026
Merged

[8.2-stable] Remove lazy loading from thumbnail#3847
tvdeyen merged 2 commits into8.2-stablefrom
backport/8.2-stable/pr-3845

Conversation

@alchemycms-bot
Copy link
Copy Markdown

Backport

This will backport the following commits from main to 8.2-stable:

Questions ?

Please refer to the Backport tool documentation

tvdeyen added 2 commits April 22, 2026 12:57
The [loading] opacity rule used a descendant selector which also matched
the cloned img that CropperJS moves into its own canvas inside the
thumbnail. If the clone's load event fired before the original's, the
cropper UI was built while the loading attribute was still set, leaving
the image inside the cropper invisible until the original fired its own
load event. Scoping the rule to direct children keeps the hide/reveal
behavior for our own placeholder while leaving nested imgs untouched.

(cherry picked from commit ed85cc4)
Setting image.loading = "lazy" after image.src starts the fetch was a
no-op. The loading attribute is consulted before fetch begins, and for
detached Image instances the fetch starts immediately when src is set.
The attribute never actually deferred anything here. Removing it makes
the code honest about what happens and prevents accidental activation
if the order is ever reversed in a context where lazy would be harmful,
such as the crop dialog.

(cherry picked from commit c8054ff)
@alchemycms-bot alchemycms-bot Bot requested a review from a team as a code owner April 22, 2026 12:57
@alchemycms-bot alchemycms-bot Bot mentioned this pull request Apr 22, 2026
3 tasks
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.06%. Comparing base (ca1795b) to head (37a0bc5).
⚠️ Report is 4 commits behind head on 8.2-stable.

Additional details and impacted files
@@             Coverage Diff             @@
##           8.2-stable    #3847   +/-   ##
===========================================
  Coverage       98.06%   98.06%           
===========================================
  Files             322      322           
  Lines            8530     8530           
===========================================
  Hits             8365     8365           
  Misses            165      165           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen merged commit 34f72ee into 8.2-stable Apr 22, 2026
24 checks passed
@tvdeyen tvdeyen deleted the backport/8.2-stable/pr-3845 branch April 22, 2026 15:37
@alchemycms-bot alchemycms-bot Bot mentioned this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant