Reputation: 23
I am adding an image in my html file, but with that way
<img src="/img/logo/logo_500x150.png" class="logo" alt="Logo 500x150"/>
the webpage just show the "missing image" picture.
If I move the image to its parent subfolder, then everything works:
<img src="/img/logo_500x150.png" class="logo" alt="Logo 500x150"/>
Notes:
the folder structure is:
web/
myfile.html
img/
logo/
in both ways, when I am at the editor and ctrl+clicking the links, they are showing the image
How can I resolve this to show images properly?
Upvotes: 1
Views: 626
Reputation: 66
if web is a public directory like www.somedomain.com/web
You can use
<img src="/web/img/logo/logo_500x150.png" class="logo" alt="Logo 500x150"/>
or
<img src="img/logo/logo_500x150.png" class="logo" alt="Logo 500x150"/>
Upvotes: 1
Reputation: 655
Image is located in the folder one level up from the current folder. Try img src=“../img/logo/
Upvotes: 0