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 :
<html>
<head>
<title>Sample image accessing.</title>
</head>
<body>
<img src="C:\Users\Public\Pictures\Sample Pictures"
width = "100px" height = "100px" alt = "Sample Image" />
</body>
</html>
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 file://
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…
file:///C:/Users/Public/Pictures/Sample Pictures/some-img-you-selected.jpg
coothead
1 Like
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.
3 Likes
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…
InstallTakeOwnership
coothead
system
Closed
April 28, 2017, 5:08pm
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.