Mention customization of next.config.js to import images (#27104)
Fixes #27094 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
This commit is contained in:
parent
1c8a7d55c1
commit
5520dd3fd9
1 changed files with 12 additions and 0 deletions
|
@ -56,6 +56,18 @@ Example:
|
|||
PORT=4000 next start
|
||||
```
|
||||
|
||||
### `next.config.js` customization to import images
|
||||
|
||||
Next.js 11 supports static image imports with `next/image`. This new feature relies on being able to process image imports. If you previously added the `next-images` or `next-optimized-images` packages you can either move to the new built-in support using `next/image` or disable the feature:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
images: {
|
||||
disableStaticImages: true,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Remove `super.componentDidCatch()` from `pages/_app.js`
|
||||
|
||||
The `next/app` component's `componentDidCatch` has been deprecated since Next.js 9 as it's no longer needed and has since been a no-op, in Next.js 11 it has been removed.
|
||||
|
|
Loading…
Reference in a new issue