[wp-trac] [WordPress Trac] #58235: Enhance hero image loading performance with Fetchpriority
WordPress Trac
noreply at wordpress.org
Tue May 2 14:34:11 UTC 2023
#58235: Enhance hero image loading performance with Fetchpriority
-------------------------+-----------------------------
Reporter: flixos90 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: performance |
-------------------------+-----------------------------
The `fetchpriority` attribute is a standard HTML attribute that allows
annotating resources (e.g. images, scripts, stylesheets, ...) on a web
page to give them a certain priority.
While the attribute can be used on different resources, this ticket is
scoped to images only. Using the `fetchpriority` attribute is recommended
with a value of “high” on the most important image on a page, which is an
important performance best practice that improves [https://web.dev/lcp/
LCP] performance.
Please see the [https://make.wordpress.org/core/2023/05/02/proposal-for-
enhancing-lcp-image-performance-with-fetchpriority/ proposal post] for
additional context.
As mentioned in the post, support for `fetchpriority` on images should be
implemented relying on similar logic as lazy-loading images uses. Yet, the
two attributes need to function on their own, e.g. even sites that disable
lazy-loading should be able to use Fetchpriority. Therefore the
engineering effort to support the `fetchpriority` attribute will involve
decoupling that logic from the `loading` attribute.
Last but not least, it should also be highlighted that, since
`fetchpriority` can be used on other elements on images, we should
consider that for the implementation. Certain parts of the implementation
may be specific to images while other parts may apply to `fetchpriority`
on any resource.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58235>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list