You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per web.dev, elements with background images are considered LCP candidates, but only when using url():
An element with a background image loaded via the url() function (as opposed to a CSS gradient)
However, we now have image-set() and the upcoming image() (hat-tip @Schepp) which are alternative methods of loading background images with additional functionality (e.g. content-type selection), so the LCP spec should be updated to consider these as valid candidates also.
I have two test pages to demonstrate the behaviour by simply swapping url() for image-set() in the CSS:
I think that WICG/element-timing might be the place to fix this, since LCP (mostly) builds on top of that spec, and an image with elementtiming set which happens to use this directive should report the correct timing info there as well.
I think that WICG/element-timing might be the place to fix this, since LCP (mostly) builds on top of that spec, and an image with elementtiming set which happens to use this directive should report the correct timing info there as well.
We need to merge the two specs, tbh.. We'll discuss that at TPAC.
As per web.dev, elements with background images are considered LCP candidates, but only when using
url()
:However, we now have
image-set()
and the upcomingimage()
(hat-tip @Schepp) which are alternative methods of loading background images with additional functionality (e.g. content-type selection), so the LCP spec should be updated to consider these as valid candidates also.I have two test pages to demonstrate the behaviour by simply swapping
url()
forimage-set()
in the CSS:url()
image-set()
Update: I've logged a parallel Chromium bug to address the implementation
The text was updated successfully, but these errors were encountered: