I’m trying to access an sample image which is provided with Windows 7 installation, from the directory as follows :
C:\Users\Public\Pictures\Sample Pictures but it is not showing an image in the browser.
HTML CODE :
<title>Sample image accessing.</title>
<img src="C:\Users\Public\Pictures\Sample Pictures"
width = "100px" height = "100px" alt = "Sample Image" />
I guess it can be done to some extent.
First you would need to make sure the permissions would allow it.
Then you have to configure your browser to do it.
A lot easier to put the image in a localhost server.
The issue is that web pages work with HTTP requests not file systems. i/e.
http:// and not
Hi there uscircuitpool,
and a warm welcome to these forums.
You have not selected a specific image
from the “Sample Pictures” folder.
Your src code should look something like this…
True that. But don’t most (modern) browsers have local file access disabled as the default? Not to mention that Windows can be protective when it comes to certain folders.
This is not referencing an image, just a folder.
I am not aware of any problem for folders in the that specific location.
If I did have a problem accessing an image or file elsewhere then I would just use…
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.