Optimize Next.js images during static export
The next-export-optimize-images library allows developers to retain the full benefits of the next/image component when using next export by performing image optimization at build time. This solves the native Next.js limitation where image optimization is typically unavailable for static exports. Key capabilities include:
- Build-time image optimization using the
sharplibrary for high performance. - Support for all standard
next/imageoptions. - Automatic format conversion (e.g., PNG to WebP).
- Local downloading and optimization of external images.
- Caching mechanism to prevent redundant optimization of unchanged images.
- Full support for TypeScript and the Next.js App Router.