Search code examples
htmlcssgoogle-chromeanimated-gif

Has anyone seen this bug in chrome, using background gifs?


In chrome 35 running on Mavericks, while using an animated gif as a background, gif only animates while user is scrolling, it's really strange, this only happens if the background is fixed, and only after the first element with a gif background

here is a demo I placed in codepen


Solution

  • I believe it is not a bug but rather a the way Google Chrome is made.

    Firefox and other browsers have ways to stop the GIF's from animating while Chrome doesn't (Unless you use extensions.)

    Here is a feature in Firefox for changing the settings of animated GIFS:

    • Open Firefox and type about:config in the address bar then press Enter. Click the “I’ll be careful I Promise” warning button to reveal a long list of preferences.
    • Look for the entry image.animation_mode (its default value should normal).
    • Double click the entry and set its value to none to completely disable image animation.
    • Double click the entry and set its value to once instead to make the GIF images animate only once.

    However, in Chrome, There is no menu option to disable animations. Even when using Chrome's extensions to disable GIF extensions, as soon as you scroll up/down the page the animations play once whilst a new screenshot is overlaid.