Images not loading lazily? #664
-
Hey y'all, Tried out the library today and it seems images are ALL eagerly loaded even though the default is supposed to be <Image
src={c.image + "/low.webp"}
alt={c.name}
layout="constrained"
height={337}
width={245}
/> You can see it live here. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Which framework is this? |
Beta Was this translation helpful? Give feedback.
-
It looks like the problem is that the images are all onscreen when the page first loads. You can see this in the first flash of loading, where the badges are all visible. Because they're onscreen, they all start to load. I've not looked closely at the CSS, but it's going to be related to the fact that constrained images will scale down if their wrapper is smaller than their max width. |
Beta Was this translation helpful? Give feedback.
It looks like the problem is that the images are all onscreen when the page first loads. You can see this in the first flash of loading, where the badges are all visible. Because they're onscreen, they all start to load. I've not looked closely at the CSS, but it's going to be related to the fact that constrained images will scale down if their wrapper is smaller than their max width.