skip to Main Content

when i try to create an item which is to be saved on the local Storage first and then display on the screen, the inputs display on the screen except the image.

enter image description here

2

Answers


  1. If the path to your image isn’t correct, you will see the path printed to the screen instead of an image. Double check that your path is correct and it should display.
    If you’re not sure, you can use FileReader to check if your path exists – https://developer.mozilla.org/en-US/docs/Web/API/FileReader.

    Login or Signup to reply.
  2. You didn’t specified if you were using a Framework or not.
    If you’re using a Framework, every images, stylesheets, fonts, etc. need to be put in a public file in the root directory of the project. Otherwise, it wont display

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search