Start browser without loading images

Browsing without loading images can be very useful because while developing some web-scraping automation it can really decrease the data traffic. This counts when using a proxy provider like Bright Data where they are billing based on the data traffic. Fewer images result in less traffic.

kameleo-images-blocked.png

Note: Always make sure first that disabling images won't affect the behavior of the website.

How to disable images in the browser

In Kameleo v2.3 we have introduced a solution for automation users where they can provide additional WebDriver capabilities to the browser when it is starting. See the POST /profiles/start endpoint in our documentation.

Basically, you can pass key-value objects as preferences to the request. Simply set profile.password_manager_enabled.images to 2 and profile.managed_default_content_settings.images to 2 as well.

{
"preferences":
[
{
"key": "profile.password_manager_enabled.images",
"value": 2
},
{
"key": "profile.managed_default_content_settings.images",
"value": 2
}
]
}

This can be set up easily with our official NuGet, NPM, and Python package. See it in our examples:

If you need this feature but you are not an automation user, please let us know in a support ticket so we will implement it.

Was this article helpful?
0 out of 0 found this helpful