How to block animated gifs in Firefox from playing automatically
Animated gifs can either be distracting, if they are not the main focus of a page, or entertaining if they are. Huge web communities exist where animated gifs get posted every minute or so.
What you do not see that often anymore are animated gifs on websites, unless it is a web page from the early days of the Internet.
Anyway, if you are on the Internet regularly you may also come into contact with animated gifs on a regular basis.
If you do not like animated gifs at all, you can disable them completely in the Firefox web browser. Good news is that you do not even need to use an extension for that, as the feature is built-in to the browser.
Up until Firefox 20, you could simply hit the Esc key to stop the animation on the page. Mozilla did change this behavior however so that this is no longer possible.
Block animated gifs in Firefox
The Firefox preference image.animation_mode determines how the browser handles animated gifs. It has three values that it accepts:
- none - will prevent all animation and display a static image instead.
- once - will run through the animation once and then stop.
- normal (default) - will allow it to play repeatedly.
To modify Firefox's default behavior in regards to animated images, do the following:
- Type about:config in the browser's address bar and hit the enter key.
- Confirm that you will be careful if this is your first time loading the page.
- Search for the preference name: image.animation_mode.
- Double-click it, and change its value from "normal" to none or once.
- To block all animation, select none.
The new value takes effect right away, which you can test on any page that is displaying animated gifs. If a page is already open, you need to reload it before the change becomes available.
While this takes care of animated gifs that are displayed on the website, it won't affect icon animations in Firefox's tab bar.
There is currently no option to disable those animations as well. While you can disable all favicons, this is probably not something that most users may want to do. If you still want to disable all favicons in Firefox, set the browser.chrome.site_icons preference to false.
Animated icons use more cpu cycles than static images, so that you may be able to reduce the cpu use of the Firefox browser by disabling these icons in it.
Note: the change takes effect on the next reload of a site. You may see favicons for the time being now until all pages got reloaded at least once in Firefox.
Extensions such as Toggle animated Gifs add new options to the process. You can use the extension to block the automatic animation of images in Firefox, and to allow the toggling of the feature.
And if you just want to control the animation, use an extension such as SuperStop to stop the animation whenever you feel like it.
If bandwidth is your main concern, try the new Gfycat Companion add-on for Firefox. It converts animated gifs into HTML5 video so that you save time and bandwidth watching them.
Ironic, came to this page to find out how to block annoying animated adds and I am blasted with them.
not working
I don’t mind animation, if it happens only “once”. Thanks for the hack!
I know this is kind of an old thread. It came up in a search. There still isn’t a FF solution. Animated anything makes me nauseous, so I needed to do something. I like favicons in general, just not animated ones. The userchrome code below worked for me.
tab[image*=”gimpchat.com”] .tab-icon-image {
display: none !important;
}
Also, I am getting hit by aminated images even when the image.animation_mode is set to none.
Bandwidth isn’t the only issue here. Accessibility too.
I have severe sensory issues, and bright and/or flashing lights can be very painful for me. When it worked, “toggle animated gifs” was very useful, but with the latest updates it no longer works. Are you aware of any replacement?
What I’d like is to not play gif-s until they are loaded. Kind of annoying to view a slide show for a big/long gif which loads slowly.
Yeah that is really bad. Glad that it does not happen often when I load gifs.
Tip: You can also install an addon called QuickJava, which offers this functionality too as well as other quick toggles – JS, CSS, Flash, Cookies, Images, and Silverlight. I don’t know if it loads gifts even though they are off.
This guide is useful for those who have experienced performance issues while displaying animated GIFs in Firefox.
And Martin you forgot to post the link to the “Toggle animated Gifs” add-on: https://addons.mozilla.org/en-US/firefox/addon/toggle-animated-gifs/
Thanks, I have added the link.
Does this stop the loading of gifs or just the animation while the loading still happens in the background, for me the whole point in disabling them would be to cut down on bandwidth and to have pages load faster.
I think it only stops the animation.