Skip to content
🎞 Why GIF in WordPress is not animated: 2 ways to fix it

🎞 Why GIF in WordPress is not animated: 2 ways to fix it

Uploaded a GIF to your site and it just sits there as a static image? A familiar situation. WordPress runs every image through three sizes by default, and on one of those passes the animation simply gets stripped out.

The problem isn't the file. It's how the media library works: the system creates thumbnail, medium, and large sizes, and for GIFs it only takes the first frame. The result is a static image instead of motion. You can fix it in a couple of minutes, without plugins or code edits.

Below are two working methods to restore animation. Plus tools for compressing GIFs before upload and reliable sources for ready-made animated files.

💡 Quick overview:

  • When inserting a GIF, choose "Full Size" in the attachment settings. WordPress won't create thumbnails and will preserve all frames.
  • Disable image optimization plugins while uploading. They force-compress the file and kill the animation.
  • Compress GIFs before uploading using EZGIF or GIF Compressor. File size will decrease without quality loss.

Why WordPress "breaks" GIF animation

WordPress is designed for processing static images. Every time you upload to the media library, the system automatically creates three copies: thumbnail (150×150 px by default), medium size (up to 768 px wide), and large (up to 2560 px). These values are set in media settings and apply to all image types. For JPEG and PNG this is convenient: you get responsive versions for different devices.

GIFs are different. The format stores a sequence of frames, not a single snapshot. When WordPress crops a GIF to standard sizes, it physically extracts only the first frame. The rest are lost. The result is a static image that looks like a screenshot of the animation's first frame.

Optimization plugins (ShortPixel, Imagify, Smush) make things worse. They compress everything indiscriminately and don't distinguish between static images and animation. The algorithms are the same as for JPEG. The result is the same: first frame instead of motion.

The good news: you can bypass the processing mechanism without touching functions.php or adding plugins.

1. Upload GIFs at full size

Selecting full size for GIF in WordPress attachment settings

The fastest method is telling WordPress not to create reduced copies for a specific file. Two clicks when inserting an image into a post.

Open the post or page editor. In the Gutenberg block editor, create an "Image" block and upload the GIF using the "Upload" button. In the classic editor, click "Add Media" and drag the file into the upload window.

Right after uploading, look at the right settings panel. In the "Attachment Display Settings" block, find the dropdown list with sizes. By default it's set to Medium or Large. Select "Full Size".

Only then click "Insert into post." WordPress will skip creating thumbnails and insert the original with all animation frames. In the Gutenberg editor, you'll immediately see a preview: the GIF will play right in the admin panel.

Why this works. When you select full size, WordPress uses the source file without processing. The system doesn't run cropping, so the frame sequence remains intact. The GIF stays untouched.

2. Disable optimization plugins while uploading

List of active image compression plugins in WordPress admin

Compression plugins are the second most common cause of "broken" GIFs after standard WordPress processing. They intercept the file at upload time and run it through their algorithms. The algorithms don't distinguish between static images and animation.

The solution is simple: temporarily deactivate optimization plugins before uploading a GIF. Go to Plugins → Installed, find ShortPixel, Imagify, Smush, EWWW Image Optimizer and click "Deactivate" for each one. Upload the GIF at full size (method 1). Then reactivate the plugins.

After deactivating, clear both server and browser cache. Caching plugins (WP Rocket, W3 Total Cache, LiteSpeed Cache) may store an old version of the page with the broken image.

An important note. Some optimization plugins compress images through a background process, not at upload time but a minute or two later. If the GIF stopped animating not immediately but after some time, check the plugin settings. Almost all of them have an "Exclude GIF from processing" or "Skip animated images" option. Enable it, and you won't have to disable the entire plugin every time.

A related problem is the HTTP error when uploading images. If you see an error message after uploading rather than a static image, the solution is in a separate article: how to fix the WordPress HTTP error.

How to compress a GIF before uploading to WordPress

An uncompressed GIF can weigh 5, 10, or even 20 megabytes. Uploading such a file to your site means guaranteed slowdown on mobile devices. Core Web Vitals respond to heavy images with a drop in LCP (Largest Contentful Paint).

The optimal approach: compress the GIF before uploading to the media library. Free online tools do this in a couple of clicks.

EZGIF is an all-in-one tool for working with GIFs. Besides compression, it can crop, trim, change animation speed, and convert GIF to WebP and MP4. You upload a file or paste a direct link, choose a compression method (Lossy GIF gives maximum reduction), and download the result. Works right in the browser, no registration required.

GIF Compressor is a tool with a single purpose: reduce GIF file size. It supports drag and drop and batch uploads. The algorithm optimizes the color palette and removes duplicate pixels between frames without touching the animation itself.

Both services are free. For one-time use, this is enough. If you work with GIFs regularly, consider desktop alternatives: ImageOptim for macOS or FileOptimizer for Windows.

Where to get animated GIFs for your site

You don't need to search for GIFs across the entire internet. Two reliable sources where files are sorted by category and ready to insert on your site.

Giphy is the largest database of animated images. Millions of GIFs are divided into categories: from reactions and memes to infographics and abstract animation. Files can be downloaded directly or embedded via embed code. The license allows use on websites as long as you don't resell the files themselves.

Reaction GIFs is a catalog of animated reactions: applause, surprise, laughter, disapproval. Convenient when you need to add emotional emphasis to text without disrupting the style. Files download with one click, no registration required.

Both sources let you filter GIFs by size and duration, which is useful when you need a lightweight file that won't slow down the page.

Video: how to add an animated GIF to WordPress

A short video tutorial in English showing the entire process from upload to publication with screen recording. If you still have questions about the editor interface after reading, the video answers them visually.

⁉️🤔 Frequently asked questions

Can I make WordPress stop creating thumbnails for GIFs automatically?

Yes, through the wp_handle_upload_prefilter hook in your child theme's functions.php. The hook intercepts the file before processing and checks the MIME type: if it's image/gif, the system skips thumbnail creation. But when the parent theme updates, the functions.php code will be lost. So either work through a child theme or move the code to the Code Snippets plugin, which survives any updates.

Why doesn't the GIF animate on the mobile version of my site?

Most often the problem is adaptive lazy loading. Some caching plugins (WP Rocket, LiteSpeed Cache) replace GIFs with a static preview on mobile devices to save bandwidth. Check the plugin settings: find the "Lazy Load for iframes and videos" or "Replace GIF with placeholder" option and disable it. If that doesn't help, test the GIF using Chrome developer tools in mobile device emulation mode.

What's the maximum GIF size allowed for WordPress?

There's no formal limit. WordPress accepts files up to 100-200 MB; the upper limit depends on server PHP settings (upload_max_filesize, post_max_size). But from a performance standpoint, keep GIFs within 1-2 MB. Anything heavier noticeably slows down loading. For animations longer than 5 seconds, it's better to use MP4 via the "Video" block: it weighs 5-10 times less at the same quality.

Can I convert a GIF to MP4 for WordPress?

Yes, and for long animations this is even recommended. The EZGIF service converts GIF to MP4 with one click. Then upload the MP4 to the media library and insert it via the "Video" block in Gutenberg. The advantage: MP4 uses inter-frame compression, so a file of the same visual quality weighs much less. The difference is especially noticeable on mobile devices.

Will the animation be restored if I re-upload the GIF after disabling plugins?

Yes, but with a nuance. If you upload a file with the same name, WordPress creates a copy with a -1, -2 suffix and so on. The old static version remains in the media library. We recommend deleting the old file via Media → Library, then uploading the GIF again with plugins disabled and full size selected. The animation will be fully restored.

What to do if the GIF still doesn't animate

The two methods described (selecting full size and disabling optimization plugins) cover most cases. But if the GIF still isn't moving, go through this short checklist.

Check the file itself. Download the GIF from the site and open it locally in a browser. If there's no animation there either, the problem is with the source file, not WordPress. This happens with poorly converted GIFs from MP4: during conversion the loop flag or animation metadata gets lost.

Check theme settings. Some themes, especially older premium themes with their own compression frameworks, intercept image uploads through built-in scripts. Temporarily switch to a default theme, such as Twenty Twenty-Five, and upload the GIF there. If it works, contact theme support.

Check the server image cache. CDN services (Cloudflare, BunnyCDN, StackPath) may cache the old static version of the file. After re-uploading the GIF, clear the CDN cache in the service's control panel.

Change the format. If nothing restores the animation, convert the GIF to MP4 using the EZGIF converter and insert it as video. For the user there's no difference: the animation plays, and the file weighs less.