How to Add Animated GIFs in WordPress (The RIGHT Way)

Hey there! Adding animated GIFs is a great way to make your WordPress site more engaging, but it can be tricky to get them working properly.

As a webmaster with over 15 years of experience, I‘ve seen my share of GIF issues on WordPress sites. But with the right setup, you can use animated GIFs without any headaches!

In this guide, I‘ll explain how WordPress handles images, why your GIFs may not be animating, and the foolproof way to insert them.

A Quick WordPress Image Primer

Before we get into the GIF specifics, let‘s go over how WordPress processes images in general. This will make the GIF piece make more sense.

When you upload an image in WordPress, whether a JPG, PNG, or GIF, it automatically generates resized copies to use in different places around your site.

For example:

  • A small thumbnail image for archives and widgets
  • A medium-sized image for inserting into blog posts
  • A large featured image for pages and posts
  • The original, full size image

By default, WordPress creates set sizes for these images:

  • Thumbnail – 150 x 150px
  • Medium – 300 x 300px
  • Large – 1024 x 1024px
  • Full size – Original dimensions

Creating these various sizes improves site performance and keeps pages fast loading.

Fun fact: Did you know over 43% of websites run on WordPress? With over 455 million active installs, optimized images are crucial for site speed!

Now let‘s look at why this image handling causes problems with animated GIFs…

Why Your GIFs Lose Animation

When WordPress creates the smaller thumbnail, medium, and large image sizes, it runs into trouble with animated GIFs.

Here‘s what happens:

WordPress takes the first frame of the GIF animation and uses this static image as the base for the resized versions.

That means all the smaller sizes lose the animation entirely!

The only one that maintains the animated GIF properly is the full size original.

For example:

GIF Example

  • The 150 x 150 thumbnail would be just the first frame
  • The 300 x 300 medium size, just the first frame
  • The 1024 x 1024 large size, just the first frame

Only the full original size keeps the full animated GIF.

Knowing this, let‘s look at how to insert GIFs the right way…

How to Add GIFs Properly in WordPress

To ensure your animated GIF appears correctly on your site, you need to specifically insert the full size image.

Avoid letting WordPress insert the smaller thumbnail, medium or large sizes.

Here is the foolproof process for adding animated GIFs:

1. Upload Your GIF

First, upload your animated GIF using the media uploader in your post editor. You can drag and drop or select it from your computer.

2. Open Image Settings

Once inserted into your post, select the GIF image to open the sidebar menu. Then expand the "Attachment Display Settings".

3. Select Full Size

Under "Size" in the sidebar menu, choose "Full Size". This inserts the original GIF rather than a resized version.

4. Publish and Preview

Update or publish your WordPress post to see the animated GIF in action! Be sure to preview on the live page and not just the editor.

And that‘s it! With this simple tweak, your animated GIFs should appear and animate correctly on your published pages.

Bonus Tips for Optimal GIFs

Here are a few additional tips for working with animated GIFs in WordPress:

  • Place GIFs strategically – Too many large GIFs can slow down your page. Use them when they really enhance content.

  • Resize responsively – If you do resize a GIF, make sure it scales properly on mobile. Large fixed-width GIFs can hinder responsive design.

  • Consider optimization plugins – These can compress GIF sizes without losing quality. Useful for improving page speed.

  • Regenerate thumbnails – If issues arise, head to Media > Regenerate Thumbnails to redo all image sizes.

  • Preview live site – Always double check how GIFs look on published site, not just editor.

  • Review converted sizes – Check the actual dimensions of resized GIF versions under Media Library listings.

Adding animated GIFs can take your WordPress content to the next level! Now you know the insider tricks to get them working seamlessly.

Let me know if you have any other WordPress questions! I‘m always happy to help out.

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.