Home > Software engineering >  Importing local images in React js file
Importing local images in React js file

Time:01-06

I searched up on how to do relative paths and absolute paths etc. but I just cannot seem to import the local images correctly. My ultimate goal is to create a react slide show with these images. What is wrong with this right now? Why is it trying to find the images in "components" when I told them to look in "media"? enter image description here

CodePudding user response:

You have a typo in import. The image is called wecome_back_image1.jpg, but you are importing it as welcome_back_image1.jpg.
You are missing the character l.
Please, try to avoid of asking questions with screenshots. Add the code instead.
It will help other developers to understand and help you easier.

CodePudding user response:

There is a spelling mistake in the file. In the slideshow.js file, the name is "welcome" but the actual file says "wecome". You are missing an "l"

  •  Tags:  
  • Related