Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Product preview card component using React

@ParvizAzeroglu

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Images don't work. I don't know why. When I test it on localhost, it works.

Community feedback

@MaximilianoDanielGarcia

Posted

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 helpful

0

@ParvizAzeroglu

Posted

@MaximilianoDanielGarcia This makes a lot of sense, thanks for your help, now the image is visible on the website

0

@bccpadge

Posted

@ParvizAzeroglu

When you update your website, make sure you click the Generate a new screenshot button to see design comparisons.

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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