I've searched everywhere but found no way to disable loading of images by Java WebEngine.
Research done:
I found some ideas, such as using URL.setURLStreamHandlerFactory()
to use my own URLStreamHandler
, and having that analyze the URL to only return URLConnection
s for URL's that don't end in .jpg .png etc. BUt that has many problems: Sometimes the image url doesn't end in .jpg, if it's a dynamic image, such as a captcha. So how can I disable automatic image loading from WebEngine?