cyrilwanner / next-optimized-images

🌅 next-optimized-images automatically optimizes images used in next.js projects (jpeg, png, svg, webp and gif).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Huge size when using the package?

melvin2016 opened this issue · comments

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? 🙂

commented

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