firefox_profile = webdriver.FirefoxProfile()
firefox_profile.add_extension(folder_xpi_file_saved_in +
    '\\quickjava-2.0.6-fx.xpi')
firefox_profile.set_preference('thatoneguydotnet.QuickJava.curVersion',
    '2.0.6.1')
firefox_profile.set_preference(
    'thatoneguydotnet.QuickJava.startupStatus.Images', 2)
firefox_profile.set_preference(
    'thatoneguydotnet.QuickJava.startupStatus.AnimatedImage', 2)
driver = webdriver.Firefox(firefox_profile)
driver.get(web_address_desired)
Disable images in Selenium Python