Add fetchpriority attribute to main book cover image#11444
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds the fetchpriority="high" attribute to the main book cover image on book pages as a performance optimization, following PageSpeed Insights recommendations.
- Adds
fetchpriority="high"attribute to improve LCP (Largest Contentful Paint) metrics
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RayBB
left a comment
There was a problem hiding this comment.
I see the same lighthouse warning on master locally.
With your branch on my local env I see the fetchpriority="high" on the correct element:
Unfortunately, I still see the warning about it missing.

It's possible it's an issue with localhost?
Anyway, I'm approving because it seems to be the right thing to do in any case even if it doesn't fix the warning on localhost.
Apparently "Important: When preloading the image, ensure fetchpriority=high is set on the preload as well as the image." https://developer.chrome.com/docs/performance/insights/lcp-discovery
|
Apparently "Important: When preloading the image, ensure fetchpriority=high is set on the preload as well as the image." https://developer.chrome.com/docs/performance/insights/lcp-discovery But it's still showing the same in my testing :/ I'm not certain if this is making much of a difference, since I see the request in a similar queueing both before / after :/ But it's best practice, I guess. |
Small perf improvement to mark the main cover on a book page as
fetchpriority="high", as suggested by pagespeed insightsTechnical
Testing
Screenshot
Stakeholders