@Lakshmi-sath
Posted
Hi , What others said may be the case or you might have forgot to upload the image files into github...
Marked as helpful
Looking to hire developers?
For some reason the images are not showing and I have tried every reason I know. Please help me out.
@Lakshmi-sath
Posted
Hi , What others said may be the case or you might have forgot to upload the image files into github...
Marked as helpful
@correlucas
Posted
👾Hello stepheigbe, congratulations for your new solution! Your image is not displaying due the fact you didnt wrote the correct path for the images, here's how you can fix it:
Here's the correct import for the image:
<img id="perfume" src="./images/image-product-desktop.jpg" alt="perfume">
Remember, when the image is inside the repository folder use dot slash ./
and if is inside a subfolder use dot dot slash ../
If the image is the same folder of the html without folder just add normal path.
👋 I hope this helps you and happy coding!
Marked as helpful
@gabcchaves
Posted
Hi, stepheigbe. The reason the image is not displayed is because you did not specify its correct path, which is "images/image-product-desktop.jpg". Besides that, I would suggest that you used a div or article tag to be the card. Also, the body could have flex display, with both centered justify-content and align-items properties.
You may take a look at my code, though it has some flaws, which I got to fix soon. (I moved on to other projects): https://github.com/gabcchaves/product-preview-card-component-main
Marked as helpful
@stepheigbe
Posted
@gabcchaves I legit just realised it on my own when another project of mine worked but thank you soo much
@freakyjones
Posted
Hi stepheigbe
congrats on completing the challenge .
\media\product.jpg
change it to ./media/product.jpg
hopefully it will
work../media/iconcart.svg
Thanks, Happy coding :)
Marked as helpful
@gulamansari57181
Posted
Hey buddy. I have seen your query and you must have been so frustrated. hahahah !!!! here is a solution to your problem
Solution: in <img> tag you had written "src="\media\product.jpg" The issue is you have used backward slash "" . You should use forward slash "/" in your absolute path.
conclusion: <img id= "img" src="media/product.jpg"> see the magic.
Happy Coding !!! Do Upvote if you feel it helping.
Marked as helpful
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