#Image breaks down when I denote the path in src attribute
6 messages · Page 1 of 1 (latest)
I can't remember the exact file structure of the project but I think it's because the images are coming from an actual URL and are not in an Images folder.
Or if they are in an Images folder then that is already included in the imageUrl file path.
We'd have to see your file structure to know exactly (could you link your project?). My guess is that your path is incorrect - the two dots "../<file path>" means you're going back out to a parent folder whereas one dot "./<file path>" means its in the current folder. Or possibly the formatting of the template string you have in your curly braces - I don't see the tick marks in your example.
https://scrimba.com/scrim/cG8zvLuE
You are right. Now I exported the images from Figma and the img broke yet again. What am I doing wrong? I linked my project above
Change your data.js so the imageUrl value to equal the image name. Example: imageUrl: "JmuyB_LibRo.png"
Then you have an error on line 8 of Card.js because the img tag does not have a src value. Either give it a value or remove it and then it will work.