Why Disable Images?#
It's often faster to load pages when you don't download images. So if you don't need to process images when scraping a web page, simply don't wait for such media data – often heavy payloads – and use less bandwidth.
How to Configure#
With Browserist, it's simple to configure. As the default setting for disable_images
is False
in BrowserSettings
, we simply alter it to True
like this:
Python | |
---|---|
Note
Not all browsers support disabling of images well: Both Safari and Internet Explorer requires us to update global settings in the operating system that may impact how these browsers behave outside Browserist.
Standardised Settings Across Browser Types#
If you want to disable image downloads with Selenium, you typically would use different settings from browser to browser. Browserist solves this problem so that settings for Chrome, Firefox, Edge, etc. are standardised.
For example, you can easily scale test runs across different browsers with a configuration like this: