Use Next.js advanced <Image/> component with the static export functionality. Optimizes all static images in an additional step after the Next.js static export.
MIT License
439
stars
52
forks
source link
Images exporting too all sizes but all rendering at full size #218
I can see my images being exported and the responsive sizes being generated and set in the image srcset, however each size of the exported image is actually being rendering at full unoptimized resolution. Here's sample of one image at it's smallest size, and largest.
Thank you very much for this bug report. The code assumed that the imageSize and deviceSizes were ordered ascending. Some logic broke because your array weren't ordered. I fixed this now.
I can see my images being exported and the responsive sizes being generated and set in the image srcset, however each size of the exported image is actually being rendering at full unoptimized resolution. Here's sample of one image at it's smallest size, and largest.
you'll see both are full resolution, though they seem to have been converted to webp properly at least.
here is my next.config.js
and my build command is
"build": "next build && next-image-export-optimizer",