1

I use VS Code, and Live Server extension, I am trying to put an image with the <img> tag, the image was in the same folder and named coin.png, I tried to type <img src="coin.png>" but this is what I get in the browser here, I tried to see the browser's console and I got this message coin.png:1 Failed to load resource: the server responded with a status of 404 (Not Found), the weird thing is that it works with any other IDE, why does that happen and how to solve it?

Kh4lid MD
  • 119
  • 1
  • 10

1 Answers1

0

you must use relative path or absolute path from your html file to your image file like this

<img src="./coin.png" />

If your image file is in the same place with your html file Or

<img src="[path to your image file]/coin.png" />
  • , i have tried this already, i still get the same problem, try it your self with live server please and tell me if it works or the problem if from me – Kh4lid MD Aug 08 '21 at 17:39
  • you can find solution in this question [link](https://stackoverflow.com/questions/24028561/relative-path-in-html) – Bug Creators Aug 08 '21 at 17:45