|
2 | 2 |
|
3 | 3 | #### Why This Error Occurred |
4 | 4 |
|
5 | | -You are attempting to run `next export` while importing the `next/image` component configured using the default `loader`. |
| 5 | +You are attempting to run `next export` while importing the `next/image` component using the default `loader` configuration. |
6 | 6 |
|
7 | 7 | However, the default `loader` relies on the Image Optimization API which is not available for exported applications. |
8 | 8 |
|
9 | 9 | This is because Next.js optimizes images on-demand, as users request them (not at build time). |
10 | 10 |
|
11 | 11 | #### Possible Ways to Fix It |
12 | 12 |
|
13 | | -- Use `next start` to run a server, which includes the Image Optimization API. |
14 | | -- Use any provider which supports Image Optimization (like [Vercel](https://vercel.com/docs/next.js/image-optimization)). |
15 | | -- 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`. |
| 13 | +- Use [`next start`](https://nextjs.org/docs/api-reference/cli#production) to run a server, which includes the Image Optimization API. |
| 14 | +- Use any provider which supports Image Optimization (such as [Vercel](https://vercel.com)). |
| 15 | +- [Configure the loader](https://nextjs.org/docs/api-reference/next/image#loader-configuration) in `next.config.js`. |
| 16 | +- Use the [`loader`](https://nextjs.org/docs/api-reference/next/image#loader) prop for each instance of `next/image`. |
17 | 17 |
|
18 | 18 | ### Useful Links |
19 | 19 |
|
20 | | -- [Deployment Documentation](https://nextjs.org/docs/deployment#vercel-recommended) |
| 20 | +- [Deployment Documentation](https://nextjs.org/docs/deployment#managed-nextjs-with-vercel) |
21 | 21 | - [Image Optimization Documentation](https://nextjs.org/docs/basic-features/image-optimization) |
22 | 22 | - [`next export` Documentation](https://nextjs.org/docs/advanced-features/static-html-export) |
23 | 23 | - [`next/image` Documentation](https://nextjs.org/docs/api-reference/next/image) |
24 | | -- [Vercel Documentation](https://vercel.com/docs/next.js/image-optimization) |
| 24 | +- [Vercel Documentation](https://vercel.com/docs/concepts/next.js/image-optimization) |
0 commit comments