General strategy for optimizing image loading?
Answered
Pink salmon posted this in #help-forum
Pink salmonOP
I am using the Image tag with webp, 300kb and "unoptimized", but when loading the page theres gray until the image loads, no way to prevent this?
Answered by B33fb0n3
nextjs images are loaded
lazy by default. You can change it to eager in the loading prop to load it immediately:// Defaults to lazy
<Image loading="eager" />6 Replies
@Pink salmon I am using the Image tag with webp, 300kb and "unoptimized", but when loading the page theres gray until the image loads, no way to prevent this?
nextjs images are loaded
lazy by default. You can change it to eager in the loading prop to load it immediately:// Defaults to lazy
<Image loading="eager" />Answer
@Pink salmon solved?
Pink salmonOP
@B33fb0n3 Hi, havent tested it since, let me try this thanks
Pink salmonOP
@B33fb0n3 worked like a charm, thank you!
happy to help