Next.js Discord

Discord Forum

next/image throws error

Answered
bscdev#1145 posted this in #help-forum
Open in Discord
Hello Everyone, I am fetching https image url from my nodejs backend. But image loading fails with an error "upstream image response failed". I can able to view my image url response in browser since image url is valid.

in next.config.mjs i have already set image hostname and protocol->https.

nextjs version is 14.1.4

I tried to put unoptimized flag and tried to load the image url from backend. But image loading failed.

Then I also tried with loader file as recommended by nextjs but image loading still fails.


<Image src={imageUrl} width={90} height={90} className='image ' alt="image" />

This issue pops up when image url is fetched directly from nodejs backend(localhost:8000).


please help.
Answered by joulev
next/image does accept external url
View full answer

4 Replies