rsnext/errors/next-image-unconfigured-host.md
Josh Flayhart ddef873b3b
Update next-image-unconfigured-host.md (#24953)
* Update next-image-unconfigured-host.md

the docs are misleading because I tried this and still got yelled at by compiler, and then added domains and it worked?

* Update next-image-unconfigured-host.md

* Update next-image-unconfigured-host.md

* Update next-image-unconfigured-host.md

* Update next-image-unconfigured-host.md

* Update next-image-unconfigured-host.md

* Update next-image-unconfigured-host.md

* remove unrelated section

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-19 19:40:52 -05:00

586 B

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.domains config in next.config.js.

Possible Ways to Fix It

Add the hostname of your URL to the images.domains config in next.config.js:

// next.config.js
module.exports = {
  images: {
    domains: ['assets.example.com'],
  },
}