[wp-trac] [WordPress Trac] #58211: Conditionally skip lazy-loading on images before the loop in classic themes

WordPress Trac noreply at wordpress.org
Thu May 18 22:15:44 UTC 2023


#58211: Conditionally skip lazy-loading on images before the loop in classic themes
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  6.3
Component:  Media                                |     Version:  5.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info needs-testing                     |  performance
-------------------------------------------------+-------------------------
Changes (by flixos90):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests has-
     testing-info needs-testing


Comment:

 Instructions to reproduce / test the PR https://github.com/WordPress
 /wordpress-develop/pull/4424:
 1. Use a classic theme that renders a post's featured image before the
 main loop in its `single.php` template (e.g. Twenty Nineteen or Twenty
 Seventeen).
 2. Create a post with a featured image.
 3. View that post (in its single view, not an archive) in the frontend in
 `trunk`: Inspect the featured image and see how it has `loading="lazy"`,
 which it shouldn't.
 4. Load the branch from the PR and reload the URL: Now, the featured image
 should no longer have `loading="lazy"` on it.

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


More information about the wp-trac mailing list