Reputation: 1
I'm brand new to HTML, but I can't figure out what I am doing wrong. My images just will not show up. I have the image in the same folder as my .html files and have tried
<img src="image.jpg"/>
<img src="image.JPEG"/>
Yet those didn't work, so I tried using these:
<img src="Users/Me/Documents/Site/image.jpg"/>
<img src=".../Users/Me/Documents/Site/image.jpg"/>
<img src="Macintosh HD/Users/Me/Documents/Site/image.jpg"/>
I still cannot get the image to show. I have double checked the casing and extension so that's not the problem. I'm working directly from my files.
Upvotes: 0
Views: 51
Reputation: 1575
As your html and image is in the same folder, no need to give any path and the syntax is also correct. Go to your folder and file settings and check whether the show extension is enabled or not if not enable it and check your image name, its probably like image.jpg.jpg
. Rename your image remove one .jpg
from the name and then try, it will work.
Upvotes: 0
Reputation: 449783
It looks like you're developing HTML pages on your local filesystem.
Modern browsers no longer support referencing images on the local filesystem unless they're in the same directory as the page (or underneath it).
That is to prevent web pages from stealing private user data by embedding it and then sending it using JavaScript, etc.
Upvotes: 0
Reputation: 11
Check that JPG file extension is uppercase in the file system. I suspect that it is lowercase. Also be sure to close the image tag.
<img src="j.jpg" alt="MISSING JPG"/>
Upvotes: 1
Reputation: 31
If you are using a Linux OS, check for permissions of the image files.
Use sudo chmod 777
to enable access to the image files. It might solve the issue.
Upvotes: 0