Skip to content

Commit

Permalink
Fix LCP attribute #103 (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Aug 14, 2023
1 parent 59b1759 commit 0edcd8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dom/performance/largestContentfulPaint.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
}

if (lcp.tagName === 'IMG') {
if (largestEntry.element.importance != 'high') {
if (largestEntry.element.fetchPriority != 'high') {
score -= 5;
advice +=
' You can add importance="high" to the image to increase the load priority that is rolling out soon in Chrome.';
' You can add fetchPriority="high" to the image to increase the load priority in Chrome.';
}
if (largestEntry.element.loading === 'lazy') {
score -= 20;
Expand Down

0 comments on commit 0edcd8b

Please sign in to comment.