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 missing images domain (#18325)
* Add err.sh for missing images domain * Apply suggestions from code review Co-authored-by: Steven <steven@ceriously.com> * Update test Co-authored-by: Steven <steven@ceriously.com>
- Loading branch information
Showing
3 changed files
with
26 additions
and
3 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,22 @@ | ||
# next/image Un-configured Host | ||
|
||
#### Why This Error Occurred | ||
|
||
On one of your pages that leverages the `next/image` component, you passed a `src` value that uses a `hostname` in the URL that isn't defined in the `images` config in `next.config.js`. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Add the `hostname` to your `images` config in `next.config.js`: | ||
|
||
```js | ||
// next.config.js | ||
module.exports = { | ||
images: { | ||
domains: ['assets.example.com'], | ||
}, | ||
} | ||
``` | ||
|
||
### Useful Links | ||
|
||
- [Image Optimization Documetnation](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
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