[wp-trac] [WordPress Trac] #64823: Image in navigation overlay can get `fetchpriority=high` and degrade LCP metric for page

WordPress Trac noreply at wordpress.org
Fri Mar 6 22:54:08 UTC 2026


#64823: Image in navigation overlay can get `fetchpriority=high` and degrade LCP
metric for page
--------------------------+-------------------------
 Reporter:  westonruter   |      Owner:  westonruter
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  7.0
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-------------------------
 This ticket is a companion to the corresponding
 [https://github.com/WordPress/gutenberg/issues/76181 Gutenberg#76181]
 issue.

 When an `IMG` is added to the new Navigation Overlay in WP 7.0, it can get
 misidentified as deserving `fetchpriority=high` when the actual LCP
 element `IMG` is further down it the page.

 While the [https://github.com/WordPress/gutenberg/pull/76208 Gutenberg PR]
 addresses this issue by adding `fetchpriority=low` to such `IMG` tags, the
 logic in `wp_get_loading_optimization_attributes()` needs to be updated to
 account for such tags so that they do not get lazy-loaded. WHen an image
 is in the Navigation Overlay or somewhere else that is occluded from view
 (e.g. a Details block or non-initial carousel slide), it is very important
 for the `IMG` to not get lazy-loaded because it means there will be a
 delay when attempting to view the image since it isn't loaded yet. For the
 Navigation Overlay, there is no browser heuristic to know it should start
 to load the image prior to the user clicking on the nav menu button. So
 the images must be loaded unconditionally, but in a deprioritized way that
 does not compete with loading resources in the critical rendering path.

 For more, see docs on web.dev: https://web.dev/articles/fetch-priority
 #lower-carousel-priority

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64823>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list