From 1a98ff0c7822ce71d139fdf4a00ac379110684f7 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Sun, 2 May 2021 15:34:33 +0200 Subject: [PATCH] If the LCP API adds an image, show it (#3369) --- lib/plugins/html/templates/url/metrics/lcp.pug | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugins/html/templates/url/metrics/lcp.pug b/lib/plugins/html/templates/url/metrics/lcp.pug index 8a431dbcb..923323623 100644 --- a/lib/plugins/html/templates/url/metrics/lcp.pug +++ b/lib/plugins/html/templates/url/metrics/lcp.pug @@ -48,3 +48,7 @@ if timings.largestContentfulPaint a(href=screenshotName) img.screenshot(src=screenshotName, alt='LCP', style='max-width:100%; height: auto') p.small The largest contentful paint is highlighted in the image. If no element is highlighted the element was removed before the screenshot or the LCP API couldn't find the element. + if timings.largestContentfulPaint.url !== '' + p The Largest Contentful Paint API highlighted this image as a part of the LCP. + a(href=timings.largestContentfulPaint.url) + img.screenshot(src=timings.largestContentfulPaint.url, alt='LCP', style='max-width:100%; height: auto')