How to reduce image size?
Answered
American black bear posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American black bearOP
The lighthouse indicates that my main image has a lot of content. How can I avoid this becoming a problem?
Code:
Code:
<Image src="/logo.webp" alt="LottoBillions" width={267} height={69} />
![Image](https://cdn.discordapp.com/attachments/1263145262973714452/1263145263237693450/Screenshot_2024-07-17_at_11.45.52.png?ex=66992b32&is=6697d9b2&hm=50d2f20a00a432984d66f4f811d919bc098385948f3323336ac6cfffec3139c0&)
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.
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.
17 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American black bearOP
if I add lazy load it says "Largest Contentful Paint image was lazily loaded"
so i have no idea... 😦
![Avatar](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
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:
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](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
@Pearls 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:
tsx
<Image src="/logo.webp" alt="LottoBillions" width={267} height={69} priority={true} />
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American black bearOP
but for LCP this priority should be true?
because I am going to to build a carousel containing some images, so maybe priority should be the images from carousel?
because I am going to to build a carousel containing some images, so maybe priority should be the images from carousel?
NextJS's documentation can help you with most of your problems. its worth taking a look at
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American black bearOP
hummm I see
thanks
🙂
![Avatar](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
no problem!
![Avatar](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
@Pearls no problem!
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American black bearOP
actually it didn't change
![Image](https://cdn.discordapp.com/attachments/1263145262973714452/1263155433313533992/Screenshot_2024-07-17_at_12.28.26.png?ex=669934ab&is=6697e32b&hm=31e8f552c939176fd3bb2a8d1cc5e22e1002bda1947904febd35d9da0cbe4e7a&)
still the same thing lol
I tried priority={true}, then priority true with loading lazy
then priortiy true with placeholder="empty"
same result
![Avatar](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
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.
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](https://cdn.discordapp.com/avatars/603291340528287791/642e035d0c8359e8964c7d6c36b2f7fa.webp?size=256)
@American black bear If you dont need any more help, please mark a solution.