We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffaa481 commit 3f8f440Copy full SHA for 3f8f440
packages/next/client/image.tsx
@@ -703,7 +703,10 @@ function defaultLoader({
703
)
704
}
705
706
- if (!configDomains.includes(parsedSrc.hostname)) {
+ if (
707
+ process.env.NODE_ENV !== 'test' &&
708
+ !configDomains.includes(parsedSrc.hostname)
709
+ ) {
710
throw new Error(
711
`Invalid src prop (${src}) on \`next/image\`, hostname "${parsedSrc.hostname}" is not configured under images in your \`next.config.js\`\n` +
712
`See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host`
0 commit comments