Bumping this because i can maybe add some good info.
We have NopCommerce 3.9 with the NivoSlider plugin.
Here, adding the above mentioned line
if (mimeType.Contains("gif")) { return pictureBinary; }
does make it possible to include animated gifs on the plugin's slides, without any further changes necessary.
The problem is that this change also disables the picture resizing for gifs (also for non-animated gifs), which means you will not be able to see animated gifs for products if a specific size is set for product pictures in the picture settings. (Except if they have that size exactly, probably.)
In any place within your webshop where you can place pictures, where there is no specific size setting, it should be possible to place animated gifs too.
To be able to add animated gifs of any size as product pictures, you must do the following:
To see the gif in the product list (for example when clicking a product category, or when "display on homepage" is selected for this product), in the picture settings you have to set product preview picture size to zero.
To see the gif in the product details page, in the picture settings you have to set product details picture size to zero.
To see it in both places, you have to set both values to zero.
A possible workaround (we did not try it but it should work) would be to always use animated gifs of the exact size specified in the picture settings, but then you would have to set preview picture size to the same number as details picture size to be able to see the same animated gifs in both places.
(Note that no matter how you set this, it always requires square pictures, length and width equal.)