-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NO_LCP on Mobile but there is one on Desktop #16157
Comments
This looks like a bug in Chrome because I can reproduce this with the performance panel. I noticed the image (which should be the LCP) loads in a blurry version before replacing it with the full resolution image. It seems likely that Chrome is getting tripped up on this. Is this progressive loading a part of your custom loader? |
I guess so, I am using https://github.com/sanity-io/next-sanity/blob/main/packages/next-sanity/src/image/Image.tsx which uses <SanityImage
src={urlForImage(post.mainImage).width(865).height(575).url()}
className="h-auto w-full rounded-lg shadow-md"
width={865}
height={575}
sizes="100vw"
alt={post.mainImage.asset.altText ?? post.mainImage.caption}
placeholder="blur"
blurDataURL={
post.mainImage.asset.metadata?.lqip ??
urlForImage(post.mainImage).width(24).height(24).blur(10).url()
}
priority
/> So I am telling it to use a blur placeholder and then IF the image metadata includes |
Thanks @JamesSingleton any chance you could create a minimum repro of this? If my prediction is correct we can probably reproduce this with the image component on a blank page. I can use that to file a bug report in Chrome. |
FAQ
URL
https://www.redshirtsports.xyz/western-carolina-looks-for-breakthrough-season
What happened?
I updated my website to use
next-sanity/image
component so that I could usenext/image
with a custom loader and pushed it to production. The image loads fine, however, running the tests in PageSpeed Insights and in lighthouse showhttps://pagespeed.web.dev/analysis/https-www-redshirtsports-xyz-western-carolina-looks-for-breakthrough-season/rpwlle03o1?form_factor=mobile
What did you expect?
That there would be an LCP for mobile due to the fact that there is one for desktop
What have you tried?
No response
How were you running Lighthouse?
PageSpeed Insights, Chrome DevTools
Lighthouse Version
12.0.0
Chrome Version
127.0.6533.120
Node Version
No response
OS
Mac
Relevant log output
No response
The text was updated successfully, but these errors were encountered: