Skip to content

Commit a63c64a

Browse files
authored
Update error message for next export and next/image. (vercel#23061)
1 parent c4508d1 commit a63c64a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

errors/export-image-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ This is because Next.js optimizes images on-demand, as users request them (not a
1111
#### Possible Ways to Fix It
1212

1313
- Use `next start` to run a server, which includes the Image Optimization API.
14-
- Use Vercel to deploy, which supports [Image Optimization](https://vercel.com/docs/next.js/image-optimization).
14+
- Use any provider which supports Image Optimization (like [Vercel](https://vercel.com/docs/next.js/image-optimization)).
1515
- Configure a third-party [loader](https://nextjs.org/docs/basic-features/image-optimization#loader) in `next.config.js`.
16+
- Use the [`loader`](https://nextjs.org/docs/api-reference/next/image#loader) prop for `next/image`.
1617

1718
### Useful Links
1819

packages/next/export/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,10 @@ export default async function exportApp(
341341
throw new Error(
342342
`Image Optimization using Next.js' default loader is not compatible with \`next export\`.
343343
Possible solutions:
344-
- Use \`next start\`, which starts the Image Optimization API.
345-
- Use Vercel to deploy, which supports Image Optimization.
344+
- Use \`next start\` to run a server, which includes the Image Optimization API.
345+
- Use any provider which supports Image Optimization (like Vercel).
346346
- Configure a third-party loader in \`next.config.js\`.
347+
- Use the \`loader\` prop for \`next/image\`.
347348
Read more: https://err.sh/next.js/export-image-api`
348349
)
349350
}

0 commit comments

Comments
 (0)