Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Unable to Show local image file:///tmp/someimage.jpg

Open ctrl-alt-d opened this issue 4 years ago • 3 comments

First, sorry about to post a question.

The issue is that I'm not able to show local images via <img src="file:///path/to/someimage.jpg ....

I posted the question on Stack Overflow 9 days ago:

  • https://stackoverflow.com/questions/62741325/show-local-image-file-tmp-someimage-jpg (+50 bounty)

Is someone so kind to give me instructions about how can I show on electron window picture files from local storage.

Thanks!!

ctrl-alt-d avatar Jul 15 '20 05:07 ctrl-alt-d

I'm having the same problem. I was able to use your workaround (converting image to base64), but a big problem for me is when trying to load a video file.

If the video file is big (~500mb) then converting to a base64 string will just take too long.

When loading a video/image (like: src="file:///path/to/video.mp4") the chrome console shows this error:

Error - Not allowed to load local resource

For blazor atleast, putting the video inside the wwwroot folder will allow it to load normally, but that isn't a real possibility for me.

IRHM avatar Sep 08 '20 16:09 IRHM

Anything happening with this?

IRHM avatar Oct 05 '20 21:10 IRHM

@ctrl-alt-d @GregorBiswanger I think this is a bug

IRHM avatar Oct 30 '20 14:10 IRHM