If the LCP API adds an image, show it (#3369)

This commit is contained in:
Peter Hedenskog 2021-05-02 15:34:33 +02:00 committed by GitHub
parent 3f379085c7
commit 1a98ff0c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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')