[wp-trac] [WordPress Trac] #56588: WordPress puts "loading=lazy" on first image on archive page - wp_get_loading_attr_default bug
WordPress Trac
noreply at wordpress.org
Wed Feb 1 23:38:41 UTC 2023
#56588: WordPress puts "loading=lazy" on first image on archive page -
wp_get_loading_attr_default bug
-------------------------------+--------------------------
Reporter: salvoaranzulla | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Media | Version: 6.0.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: performance
-------------------------------+--------------------------
Changes (by flixos90):
* keywords: => reporter-feedback
Comment:
Thanks @salvoaranzulla, I have this ticket on my radar and am planning a
coordinated effort to identify the remaining lazy-loading problems
including the one you're having.
I have tested the scenario you're describing. Unfortunately, it looks like
the excerpt is not the cause for this problem. I am using a post with a
few images in it, and I display `the_excerpt()` before calling
`the_post_thumbnail()`, and my post thumbnail, as expected, does not have
the `loading="lazy"` attribute.
I certainly acknowledge though that there must be another bug happening
that is causing that problem on your site. Can you maybe provide a bit
more context? If at all possible, would you mind sharing a larger code
sample of the template used on that page? I would like to figure out what
the exact bug is.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56588#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list