Next.js Discord

Discord Forum

How to reduce image size?

Answered
American black bear posted this in #help-forum
Open in Discord
Avatar
American black bearOP
The lighthouse indicates that my main image has a lot of content. How can I avoid this becoming a problem?
Code:
<Image src="/logo.webp" alt="LottoBillions" width={267} height={69} />
Image
Answered by Pearls
Thats odd, well theres always other ways of optimizing images.
Heres the documentation for it:
https://nextjs.org/docs/app/building-your-application/optimizing/images

You can also image minifiers, or compressors, there are plently of them on the internet.
View full answer

17 Replies

Avatar
American black bearOP
if I add lazy load it says "Largest Contentful Paint image was lazily loaded"
so i have no idea... 😦
Avatar
Theres an option especially for that, its called 'priority'
when this option is set to 'true' it will be considered a 'high' priority image.

heres a more detailed explaination:
https://nextjs.org/docs/app/api-reference/components/image#priority

Example:
<Image src="/logo.webp" alt="LottoBillions" width={267} height={69} priority={true} />
Avatar
Image
NextJS's documentation can help you with most of your problems. its worth taking a look at
Avatar
American black bearOP
hummm I see
thanks
🙂
Avatar
no problem!
Avatar
@Pearls no problem!
Avatar
American black bearOP
actually it didn't change
Image
still the same thing lol
I tried priority={true}, then priority true with loading lazy
then priortiy true with placeholder="empty"
same result
Avatar
Thats odd, well theres always other ways of optimizing images.
Heres the documentation for it:
https://nextjs.org/docs/app/building-your-application/optimizing/images

You can also image minifiers, or compressors, there are plently of them on the internet.
Answer
Avatar
@American black bear If you dont need any more help, please mark a solution.