[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
Sat May 20 07:27:44 UTC 2023


#56588: WordPress puts "loading=lazy" on first image on archive page -
wp_get_loading_attr_default bug
--------------------------------------+--------------------------
 Reporter:  salvoaranzulla            |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  assigned
 Priority:  high                      |   Milestone:  6.3
Component:  Media                     |     Version:  5.9
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by costdev):

 Hi @flixos90, I can't seem to reproduce the original issue. Can you check
 my testing steps and let me know where I'm going wrong?

 1. Use Twenty-Twenty One.
 2. In Customizer, ensure the "Excerpt Settings" are set to "Summary".
 3. Create a post with a featured image, but no images in its content.
 4. Create another post with no featured image, but 3 images in its
 content.
 5. View the `Categorized` category page.
 6. Inspect the featured image of the original post, which should be the
 only image on the page.
 7. It should have `loading="lazy"` ❌ It doesn't.

 I tested on 5.9 which this issue was originally reported against, but
 couldn't reproduce it. Where am I going wrong? If the above steps seem to
 be accurate, can you try reproducing the issue again on 5.9?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56588#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list