-
Notifications
You must be signed in to change notification settings - Fork 26k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add err.sh for image config errors (#18424)
* Add err.sh for image config errors * Apply suggestions from code review Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Steven <steven@ceriously.com>
- Loading branch information
Showing
2 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Invalid images config | ||
|
||
#### Why This Error Occurred | ||
|
||
In your `next.config.js` file you provided an invalid config for the `images` field. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Make sure your `images` field follows the allowed config shape and values: | ||
|
||
```js | ||
module.exports = { | ||
images: { | ||
// limit of 25 deviceSizes values | ||
deviceSizes: [320, 420, 768, 1024, 1200], | ||
// limit of 25 imageSizes values | ||
imageSizes: [], | ||
// limit of 50 domains values | ||
domains: [], | ||
path: '/_next/image', | ||
// loader can be 'default', 'imgix', 'cloudinary', or 'akamai' | ||
loader: 'default', | ||
}, | ||
} | ||
``` | ||
|
||
### Useful Links | ||
|
||
- [Image Optimization Documentation](https://nextjs.org/docs/basic-features/image-optimization) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters