Skip to content

Commit

Permalink
Fix LCP attribute #103
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jul 25, 2023
1 parent 14eba66 commit ff501ef
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 ff501ef

Please sign in to comment.