Submitted about 1 year ago
Product preview card component using React
@ParvizAzeroglu
Design comparison
SolutionDesign
Solution retrospective
Images don't work. I don't know why. When I test it on localhost, it works.
Community feedback
- @MaximilianoDanielGarciaPosted about 1 year ago
Hi Parviz,
You need to create a public folder in your root and put all your images inside. After that, change your relative path.
function CardImage({ img }) { return ( <div className="image-container"> <img src={`./${img}`} alt="Parfume Images" /> </div> ); }
Let me know if these help you to fix it.
Marked as helpful0@ParvizAzerogluPosted about 1 year ago@MaximilianoDanielGarcia This makes a lot of sense, thanks for your help, now the image is visible on the website
0@bccpadgePosted about 1 year ago@ParvizAzeroglu
When you update your website, make sure you click the Generate a new screenshot button to see design comparisons.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord