I need to insert an animated gif for a feature image but I don’t understand if is possible.
Right now when I try to upload a gif, wordpress create automatically a gif single frame.
Is it possible to do this and what part of code I have to modify?
Thank you so much in advance!
To use gifs in WordPress you need to insert the full size of the uploaded gif (the original size).
In the Media Box : Size: Full Size
Any other size you choose will not render because of how GD crops and re-sizes the photos, it does so by taking a single frame, to make it animated you would have to recomposite the frames, something which WordPress does not do.
If your featured image is not inserting the full size that means your theme ( or a plugin) is altering which size can be inserted into the post. You can check by clicking:
“Set featured image” –> Select your gif –> look at ATTACHMENT DETAILS and compare the size you see to the original image.
ps. As far as I can tell this is due to GD and not WordPress (though it is possible to code).