Merged
Conversation
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.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3845 +/- ##
=======================================
Coverage 98.06% 98.06%
=======================================
Files 322 322
Lines 8530 8530
=======================================
Hits 8365 8365
Misses 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sascha-karnatz
approved these changes
Apr 22, 2026
💔 Some backports could not be created
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Collaborator
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this pull request for?
Setting
image.loading = "lazy"afterimage.srcstarts the fetch was ano-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.
And scope the thumbnail image CSS to direct children
The
[loading] opacityrule used a descendant selector which also matchedthe cloned
imgthat CropperJS moves into its own canvas inside thethumbnail. If the clone's
loadevent fired before the original's, thecropper UI was built while the
loadingattribute was still set, leavingthe 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.
Checklist