question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It's impossible to disable images in Firefox

See original GitHub issue

Meta -

OS: Windows Selenium Version: 2.53 Browser: Firefox Browser Version: 46.0.1

Steps to reproduce -

create driver instance using this capabilities

DesiredCapabilities capabilities = new DesiredCapabilities();
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("permissions.default.image", 2);
capabilities.setCapability("firefox_profile", profile);

Note if I use exist FF profile FirefoxProfile profile = new ProfilesIni().getProfile("existProfile") images are disabled

Expected Behavior -

Images are disabled in broswer

Actual Behavior -

Images aren’t disabled in broswer

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
barancevcommented, Nov 18, 2017
FirefoxOptions options = new FirefoxOptions()
    .addPreference("permissions.default.image", 2);
driver = new FirefoxDriver(options);

Works well in Selenium 3.7.0, tested in Firefox 57 + geckodriver 0.19 and Firefox ESR 52 with legacy driver.

0reactions
jquacinellacommented, Jan 10, 2017

@lukeis This is super easy to do in chrome. Why is this not able to be done via geckodriver?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable images in firefox - Mozilla Support
Go to about:config, search for this option "permissions.default.image" change it to 2. Possible values: 1 -- Always load the images.
Read more >
Is is possible to temporarily disable images, i.e. force text only?
Chosen solution · Tools -> Options -> Content · uncheck the box for "Load images automatically".
Read more >
How can I stop images from loading? | Firefox Support Forum
I couldn't find the option to stop automatically loading images. Is there a way to do this? Using Firefox 59.0.2.
Read more >
Disabling image loading doesn't work | Firefox Support Forum
If you want a "recommended" extension to block images, try uBlock Origin . Select 'I am an advanced user' in its Options page....
Read more >
It's impossible to disable images in Firefox #2171 - GitHub
It's impossible to disable images in Firefox · Issue #2171 · SeleniumHQ/selenium · GitHub.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found