I've been trying to upload an image in my webpage where i have multiple directories. I tried loading the image when the file was in the same directory as index.html. I tried loading the image when the file was in the directory templates and i even tried to make a directory images and upload it from there but nothing works. As you can see from the image, I copied the path and the relative path(i tried both) and put int "img src" but the image just won't load. The terminal says that it can't find the image due to a 404 error and gets me a link but when i click the yellow link I am able to see the picture. What else can i try?
CodePudding user response:
try relocating your image where your html file is and changing the type of file
CodePudding user response:
index.html
resides in /templates
and your relative path would lead to /templates/workspaces
which obviously does not exist.
You can do something like
<img src="slika.jpg">
if the index.html
and slika.jpg
are in the same directory.