Replies: 13 comments 40 replies
-
It seems your |
Beta Was this translation helpful? Give feedback.
-
I solve this issue by conditionally display { product.displayImage ?
<Image src={product.displayImage} width="300" height="500" /> :
<Image src={'/placeholder.png'} width="300" height="500" />
} |
Beta Was this translation helpful? Give feedback.
-
I am also facing this issue. Sometimes the error shows up and sometime it doesn't. I saw that when I was normally logging the property it was getting logged in the console properly. I don't know why this is happening 🥲 |
Beta Was this translation helpful? Give feedback.
-
I solve this issue with a conditionally like this:
I hope i've helped you |
Beta Was this translation helpful? Give feedback.
-
I have the same issue, i solved adding the operator AND: |
Beta Was this translation helpful? Give feedback.
-
I have th same issue, but in my case i needed to add this in next.config.js:
Then i added absolute path in Image src:
|
Beta Was this translation helpful? Give feedback.
-
Just had another non-mentioned case to debug. WRONG: <Image
src={myStaticImage.src}
/> FIXED: <Image
src={myStaticImage}
/> |
Beta Was this translation helpful? Give feedback.
-
I think you should do with 'template literals' <Image src={'${product.displayImage}'} /> symbols ' assume for ` |
Beta Was this translation helpful? Give feedback.
-
Any Help ?? |
Beta Was this translation helpful? Give feedback.
-
This worked for me: |
Beta Was this translation helpful? Give feedback.
-
Hello, Thank you for help! Code:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks to Copilot, issue resolved. I am not sure what is the exact fix, I tried to add null check but that didn't solve.
It works Nope adding "width" etc didn't solve, but somehow the above code solved it! |
Beta Was this translation helpful? Give feedback.
-
Why I am getting this weird error while passing image data. Image "src" is already defined.
Uncaught Error: Image is missing required "src" property. Make sure you pass "src" in props to the
next/image
component. Received: {"width":300,"height":500}<div className={styles.image_container}> <Link href={
/p/${encodeURIComponent(product.slug)}}> <a> <Image src={product.displayImage} alt={product.name} width={300} height={500} /> </a> </Link> </div>
Beta Was this translation helpful? Give feedback.
All reactions