Closed
Description
It looks like initial support for next/image
was requested in next-on-netlify
in netlify/next-on-netlify#70 and added in netlify/next-on-netlify#138.
Now that next-on-netlify
is deprecated, it's unclear what the recommended method for serving Next.js images is.
Current, if the <Image />
tag is used in a Next.js site, deploys to Netlify fail with:
Error: Image Optimization using Next.js' default loader is not compatible with `next export`.
Possible solutions:
- Use `next start`, which starts the Image Optimization API.
- Use Vercel to deploy, which supports Image Optimization.
- Configure a third-party loader in `next.config.js`.
Read more: https://err.sh/next.js/export-image-api