Image component delivers the wrong image even if the URL is correct.
Answered
Cicada killer posted this in #help-forum
Cicada killerOP
I am using the Image component from next/image and it was working as it should until recently.
Its starting to show the wrong image but has the correct url for that image.
Instead of getting that image im getting another image near that image in the cdn. but the build shows the correct image dom:
if i use the regular html <img> tag instead of Image component then the right image is shown.
Its starting to show the wrong image but has the correct url for that image.
let externalImageURL = "https://cdn.something.com/image.jpg"
<Image src={externalImageURL} layout={"fill"} />Instead of getting that image im getting another image near that image in the cdn. but the build shows the correct image dom:
<img decoding="async" data-nimg="fill" src="/_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=3840&q=75" style="position: absolute; height: 100%; width: 100%; inset: 0px;" loading="lazy" sizes="100vw" srcset="/_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=640&q=75 640w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=750&q=75 750w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=828&q=75 828w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=1080&q=75 1080w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=1200&q=75 1200w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=1920&q=75 1920w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=2048&q=75 2048w, /_next/image?url=https%3A%2F%2Fcdn.something.com%2Fsimage.jpg&w=3840&q=75 3840w"></img>if i use the regular html <img> tag instead of Image component then the right image is shown.
5 Replies
Cicada killerOP
its seflhosted. @DirtyCajunRice | AppDir
@Cicada killer its seflhosted. <@184479429404262410>
then delete your .next and rebuild
Answer
Cicada killerOP
ok
@Cicada killer ok
Asian black bear
Do you have fixed it, I have the same issure. I delete my .next and rebuild, but it still doesn't show the picture.