[Gambas-user] WebView no longer shows images loaded from disk
T Lee Davidson
t.lee.davidson at gmail.com
Sun Jan 21 19:35:35 CET 2024
On 1/21/24 06:52, vuott--- via User wrote:
> Hello,
> ...this works:
> WebView1.SetHtml("<IMG src=https://gambas.sourceforge.net/logo-circle.png <https://gambas.sourceforge.net/logo-circle.png>>")
>
> ...this does not work (once it did):
> WebView1.SetHtml("<IMG src=file:///path/of/my/image_file>")
>
> regards
I confirm that using the "file://" protocol to set the source of an <IMG> tag to a local file does not work.
However, the "file://" protocol does work when setting the 'href' of an anchor tag:
WebView1.SetHtml("<a href=file:///path/of/my/image_file>My Image</a>")
Clicking the link displays the image.
This doesn't help you specifically but may help diagnose the issue - since is appears to not be use of the "file://" protocol
itself, but using it to set the source of an <IMG> tag.
--
Lee
More information about the User
mailing list