From d7e3b43577ef2b160af5d5feaf652262e2022dfd Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 27 Oct 2020 14:05:24 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Steven --- errors/next-image-unconfigured-host.md | 2 +- packages/next/client/image.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/errors/next-image-unconfigured-host.md b/errors/next-image-unconfigured-host.md index c4923d215b5a6..a06b56e68e55f 100644 --- a/errors/next-image-unconfigured-host.md +++ b/errors/next-image-unconfigured-host.md @@ -12,7 +12,7 @@ Add the `hostname` to your `images` config in `next.config.js`: // next.config.js module.exports = { images: { - domains: [HOSTNAME_FROM_ERROR], + domains: ['assets.example.com'], }, } ``` diff --git a/packages/next/client/image.tsx b/packages/next/client/image.tsx index dfc1fcabb4524..54e6635ed5c63 100644 --- a/packages/next/client/image.tsx +++ b/packages/next/client/image.tsx @@ -437,7 +437,7 @@ function defaultLoader({ root, src, width, quality }: LoaderProps): string { if (!configDomains.includes(parsedSrc.hostname)) { throw new Error( - `Invalid src prop (${src}) on \`next/image\`, hostname is not configured under images in your \`next.config.js\`\n` + + `Invalid src prop (${src}) on \`next/image\`, hostname "${parsedSrc.hostname}" is not configured under images in your \`next.config.js\`\n` + `See more info: https://err.sh/nextjs/next-image-unconfigured-host` ) }