Invalid src prop hostname is not configured under images in your next.config.js
#26470
Labels
bug
Issue was opened via the bug report template.
next.config.js
#26470
What version of Next.js are you using?
11.0.0
What version of Node.js are you using?
14.15.5
What browser are you using?
Chrome
What operating system are you using?
linux
How are you deploying your application?
Vercel
Describe the Bug
I am trying to add the image from unsplash with the following url:
I am getting an error
So I updated my next.config.js to the following:
But I still see this error. This is very unclear why it is happening. Am I doing something wrong?
UPDATE:
It happens only in storybook, and does not happen in plain app.
Any suggestions that can help?
If I save the image locally, to stories/assets/image.jpg
And then import it as
It still does not work, this time I am getting another error
I went further and tried to use
which again gave me the error
Using images has never been so hard....
Are there any guides about this? As it is really unclear, an despite a lot of workarounds it would be good to have a clear solution.
Expected Behavior
Image should be loaded when domains array is specified and contains the domain for the image.
To Reproduce
Create next app
use the above image
Use component
The text was updated successfully, but these errors were encountered: