I'd like to be able to specify a local file path for an image on a web page delivered via http using Chrome - is this possible?
I remember doing this using IE but cannot remember how! Some trusted settings I think...
you can convert the image to base-64 code, for example with "http://duri.me/" and copy the result to browser! Like:
Non-local web pages cannot access local files in Chrome or any modern web browser.
Since you mentioned 'Chrome', you could use Chrome extensions to do this, to enable local access to your files.
Follow these steps:
1) In the local folder where your image(s) are, create this file called 'manifest.json' and enter this:
2) Put this is your chrome address bar: chrome://extensions/
3) Make sure 'Developer mode' is checked (Top right of page)
4) Click the 'Load Unpacked Extension' button
5) Navigate to the local folder where the image(s) and the manifest.json file is, click ok
6) The extension 'File Exposer' should now be listed in the list, and have a check mark against 'Enabled'. If the folder is on a network drive or other slow drive or has lots of files in, it could take 10-20 seconds or more to appear in the list.
7) Note the 'ID' string that has been associated with your extension. This is the EXTENSION_ID
8) Now in your HTML you can access the file with the following, changing the 'EXTERNSION_ID' to whatever ID your extension generated:
Note, that the *.jpg is recursive and it will automatically match files in the specified folder and all sub folders, you dont need to specify for each sub folder. Also note, its Case Sensitive.
In the 'img' tag you dont specify the original folder, its relative from that folder, so only sub folders need to be specified.
If you modify the manifest.json file, you will need to click the 'Reload (Ctrl+R)' link next to the extension.