Search for the image.animation_mode flag and change its value from Normal to None.
Type about:config in Firefox address bar and hit Enter to open Settings. Under the Multimedia section, uncheck the Play animations in webpage check-box, click Apply and Exit and then restart your computer. To permanently disable the playing of animated GIF images, open Internet Options > Advanced tab. If you wish to restart the animations you need to refresh the page. This will stop the animation on that page. To stop animations on a single page you can just press the 'Esc' key. Users of Edge (Chromium) browser can install the Chrome extensions above and use them. There is currently no way to disable animations within Microsoft Edge. Hide GIFS I am Reading lets you turn animated GIFs on when you want them, and off when you don’t want to get distracted.
Animation Policy from Google will help you set your own preferences. Chrome users will need to use browser extensions.