In my application I want to serve an image to the UI, so I create a file handler. When opening the window using Firefox, the UI displays the expected image via CSS background-image or HTML <img/> tag. However, when I use wbWebview, no image is displayed, and the HTML tag shows the "unknown image" question-mark icon.
If I instead specify a rootPath and comment out the file handler, the UI will display the image. I don't want to do that though, because it gives me much less control over what the UI can access in my filesystem, and it precludes being able to bundle assets as part of my binary executable.
I don't know the best way to investigate why this is happening but I'd be happy to provide more information given a bit of debugging tips.
In my application I want to serve an image to the UI, so I create a file handler. When opening the window using Firefox, the UI displays the expected image via CSS
background-imageor HTML<img/>tag. However, when I usewbWebview, no image is displayed, and the HTML tag shows the "unknown image" question-mark icon.If I instead specify a
rootPathand comment out the file handler, the UI will display the image. I don't want to do that though, because it gives me much less control over what the UI can access in my filesystem, and it precludes being able to bundle assets as part of my binary executable.I don't know the best way to investigate why this is happening but I'd be happy to provide more information given a bit of debugging tips.