rsnext/errors/export-image-api.md
Steven 7f6afa4a89
Update links in next export + next/image error message (#33317)
Minor changes to this error message to link to latest docs
2022-01-14 15:19:52 +00:00

1.3 KiB

next export with Image API

Why This Error Occurred

You are attempting to run next export while importing the next/image component using the default loader configuration.

However, the default loader relies on the Image Optimization API which is not available for exported applications.

This is because Next.js optimizes images on-demand, as users request them (not at build time).

Possible Ways to Fix It

  • Use next start to run a server, which includes the Image Optimization API.
  • Use any provider which supports Image Optimization (such as Vercel).
  • Configure the loader in next.config.js.
  • Use the loader prop for each instance of next/image.