[flagged]
NextJS won't let you export their optimized images in a static site export because they want _everything_ running through their Express server.
Why's that great for them? Because they get to charge you for image bandwidth and image optimization. This is called vendor lock in.
Sources:
In vivo (v13.3.0):
> npx next export
<...>
error - Image Optimization using the default loader is not compatible with export.
Possible solutions:
- Use `next start` to run a server, which includes the Image Optimization API.
- Configure `images.unoptimized = true` in `next.config.js` to disable the Image Optimization API.
Read more: https://nextjs.org/docs/messages/export-image-api
and https://vercel.com/changelog/changes-to-vercel-image-optimiz...The point is that the library artificially limits capability because it benefits a particular vendor model, not the user.
The comparison to npm is worrisome. npm inc. spent years trying to make a profit & grow beyond "privately owned package registry". It failed and was acqui-hired by Github back in 2020 for an amount far beneath its capitalization.