Next.js Discord

Discord Forum

How to reduce image size?

Answered
American black bear posted this in #help-forum
Open in Discord
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} />
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

American black bearOP
if I add lazy load it says "Largest Contentful Paint image was lazily loaded"
so i have no idea... 😦
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} />
NextJS's documentation can help you with most of your problems. its worth taking a look at
American black bearOP
hummm I see
thanks
🙂
no problem!
@Pearls no problem!
American black bearOP
actually it didn't change
still the same thing lol
I tried priority={true}, then priority true with loading lazy
then priortiy true with placeholder="empty"
same result
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
@American black bear If you dont need any more help, please mark a solution.