Skip to content

Add fetchpriority attribute to main book cover image#11444

Merged
cdrini merged 4 commits intomasterfrom
perf/fetchpriority-high-cover
Nov 12, 2025
Merged

Add fetchpriority attribute to main book cover image#11444
cdrini merged 4 commits intomasterfrom
perf/fetchpriority-high-cover

Conversation

@cdrini
Copy link
Copy Markdown
Collaborator

@cdrini cdrini commented Nov 10, 2025

Small perf improvement to mark the main cover on a book page as fetchpriority="high", as suggested by pagespeed insights

image

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings November 10, 2025 23:14
@github-project-automation github-project-automation bot moved this to Waiting Review/Merge from Staff in Ray's Project Nov 10, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

cdrini and others added 2 commits November 10, 2025 18:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Image

Unfortunately, I still see the warning about it missing.
Image

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
@cdrini
Copy link
Copy Markdown
Collaborator Author

cdrini commented Nov 12, 2025

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.

@cdrini cdrini merged commit 442ff5d into master Nov 12, 2025
8 checks passed
@cdrini cdrini deleted the perf/fetchpriority-high-cover branch November 12, 2025 20:37
@github-project-automation github-project-automation bot moved this from Waiting Review/Merge from Staff to Done in Ray's Project Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants