1from selenium import webdriver
2
3profile = webdriver.FirefoxProfile()
4# 1 - Allow all images
5# 2 - Block all images
6# 3 - Block 3rd party images
7profile.set_preference("permissions.default.image", 2)
8
9driver = webdriver.Firefox(firefox_profile=profile)
10