I am new to electron and trying to load images from the local file system to display it on screen. So for images from the remote URLs are working just fine when I do
<img src='https://example.com/image.jpg' />
But when I try to load the same image from the local file system in my render process it does not work
<img src='file:///C:/tmp/image.jpg' />
is not rendered.
This is the error I got:
> Not allowed to load local resource:
> file:///C:/tmp/nW4jY0CHsepy08J9CkF1u3CJVfi4Yvzl_screenshot.png
> dashboard:1 Not allowed to load local resource:
> file:///C:/tmp/TOyUYWnJK7VS9wWeyABhdgCNmp38FyHt_screenshot.png
Is there any configuration that needs to be made to allow the electron to render images from the local file system Or I am doing it entirely wrong?
/
for `\` – Saltwater