Setting an Animated GIF as a Featured Image in WordPress

Setting an Animated GIF as a Featured Image in WordPress

If you’ve ever tried to set an animated gif as a featured image in WordPress, you’ve probably discovered that you can’t.

The reason why is pretty simple. Your theme grabs a resized version of the featured image you upload. And in the case of an animated gif, that means it’s not grabbing the original gif image, and so you end up with a static image.


The Solution

The way around this is pretty simple, however. You can just install a plugin that automatically sets the featured image from the first image in a post. Of course that means you will need to make the animated image the first image, but at least it’s a workaround.

Here’s a look at an animated gif in the featured image spot on a category page.

There are a number of plugins that will let you automatically set your first image as the featured image. I tried two and the both worked: Autoset Featured Image and Automatic Featured Image Posts.

Something else I found was that I didn’t even need to download the gif. I could just insert it with the URL.

One last note: In order to try to get a little more wiggle room with the positioning of images, I did try inserting an animated gif first, publishing the post to get it featured, and then going back in and inserting another image on top of it. But both plugins I tried took the new first image and made it the featured image, which is what they should do, of course. But I thought I’d give it a try.