On Tue, Sep 17, 2024 at 09:54:18AM +0200, a1ex@dismail.de wrote:
Hi,
The pref 'load_images=NO' only disables loading images from a remote img src, and not from an embedded[1] data:image src.
If this behavior is intentional, would it be reasonable to implement an option to disable all images?
It might be the case that the user does not want to see any images, no matter the img src.
If anyone cares about this issue, here is a simple fix to make sure that embedded images do not display when 'load_images' is disabled:
--- a/src/html.cc Tue Sep 17 09:41:51 2024 +++ b/src/html.cc Tue Sep 17 09:42:44 2024 @@ -2165,7 +2165,6 @@ DilloImage *a_Html_image_new(DilloHtml *html, const ch html->images->set(html->images->size() - 1, hi);
load_now = prefs.load_images || - !dStrAsciiCasecmp(URL_SCHEME(url), "data") || (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached);
if (load_now && Html_load_image(html->bw, url, html->page_url, image)) {
Maybe it would be better to have a separate option to turn this off/on, but I won't bother with that unless there is interest in it.
I don't have an strong opinion on this, as sometimes it is handy to render bullets or other small "symbols". But other times they embed a large image. In any case, the image data is already downloaded anyway. Best, Rodrigo.