cyrilwanner / next-optimized-images

🌅 next-optimized-images automatically optimizes images used in next.js projects (jpeg, png, svg, webp and gif).
MIT License
2.21k stars 93 forks source link

Huge size when using the package? #214

Closed melvin2016 closed 3 years ago

melvin2016 commented 4 years ago

I have a component called ImageLoaderUtil which I'm using to convert raw images to webp and also place lqip placeholders. But I get huge page sizes when Next.js builds the site.

ImageLoaderUtil.jsx Component

Screenshot 2020-10-17 at 3 19 32 PM

Size of the Page with webp and lqip loaders when Next.js builds the site.

Screenshot 2020-10-17 at 3 20 01 PM

Size of the Page when I removed webp and lqip loaders

Screenshot 2020-10-17 at 3 21 38 PM

Can someone suggest to me a better solution? 🙂

z0lo13 commented 3 years ago

try loading images dynamically without ssr it will remove images from build