From ff501ef07157d66e3a7725fcceca4d42fa803862 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Tue, 25 Jul 2023 11:15:16 +0200 Subject: [PATCH] Fix LCP attribute https://github.com/sitespeedio/coach-core/issues/103 --- lib/dom/performance/largestContentfulPaint.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dom/performance/largestContentfulPaint.js b/lib/dom/performance/largestContentfulPaint.js index 31d6c5e..79e7d1b 100644 --- a/lib/dom/performance/largestContentfulPaint.js +++ b/lib/dom/performance/largestContentfulPaint.js @@ -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;