Problem importing my custom images into my scrim

Hi guys!

I’m getting an error when I am console logging the images that I tried to import in to my project. I was hoping someone might be able lend me a hand to figure out what I’m doing wrong?

Thanks, here is a link to my scrim

My React is rusty so take this with a pinch of salt but, depending on what you want to do, I think you could just import the image folder and then use .map. Something like [this]
(ChatGPT).

1 Like

Thanks again Leanne! That pointed me in the right direction. I ended up creating an array of images and then in the diceElements variable inside the map method I created a prop like this: imageSrc={imgsUrlArr[die.value - 1]}. Then in Die.js I changed the h2 to an img tag and used {props.imgSrc} to insert the images. I have updated my scrim with the working code. Your help is much appreciated. Now how to make it so the image change when they are held. Wish me luck!

Happy to hear it pointed you in the right direction! Hope the studies continue to go well :slight_smile: