I am building a gtk desktop application. The main part of my views are HTML. So I make use of the Python implementation of Webkit. The problem is, that I cant include images, as Webkit does not allow to load images from local file system:
<img src="file://{{media_开发者_C百科url}}_theme/media/img/eft.png"/>
=> This will cause a "Not allowed to load local resource".
Is there a way to load static files like images or css-files locally?
You can use base64 to encode your images as texts that can be included in your html pages.
@Skami 18's answer seems like a good direction. Maybe then use a data URI to actually set the src
attribute?
精彩评论