[wp-trac] [WordPress Trac] #58681: No lazy loading attribute on images in gallery
WordPress Trac
noreply at wordpress.org
Wed Jul 5 22:32:28 UTC 2023
#58681: No lazy loading attribute on images in gallery
--------------------------+--------------------------
Reporter: spacedmonkey | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.4
Component: Media | Version: 5.5
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: performance
--------------------------+--------------------------
Comment (by joemcgill):
Thanks @flixos90. I've been looking into this today and came to the same
conclusion as you just described above. The shortcodes are always being
processed after content images are filtered by `wp_filter_content_tags`.
Previously, dynamic images created as part of the content were always
having `lazy` applied, which had it's own problems, as you described.
I'm curious if something like [https://github.com/WordPress/wordpress-
develop/pull/4799#issuecomment-1622614659 PR #4799] would be a simple
workaround for shortcodes? Generally, I think finding a way of processing
all content images at once, regardless of how they're created, would be
the most robust strategy, since currently we can't determine the order in
which a dynamic image added via a shortcode will fall in the markup when
compared with image blocks or classic editor content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58681#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list