Have you ever wondered how some blogs have animated GIFs and when you try to do the same your WordPress GIF is not working? Much like images, GIFs make your site more appealing and engaging.
Often when you add GIF, WordPress turns it into a static picture. In this article, we would like to discuss why WordPress GIF is not working?
Why GIF Images are not Working in WordPress?
When a GIF file is uploaded to WordPress it will be processed 3 times before getting added to your media library. By default, WordPress crops your GIFs and as a result, it gets uploaded as a static image, because the animation will be destroyed in the process.
Also some themes and plugins, image optimization plugins to be exact can enforce resizing images when uploading them to your website. As mentioned above, there are three default sizes in WordPress, thumbnail, medium and large. Some WordPress themes come with limited flexibility and they may restrict the image size in WordPress.
In the processing phase, WordPress only grabs the first frame of the GIF. That’s why when you upload a GIF and when trying to insert it into your post, you see a static image instead of the animated GIF you had originally uploaded.
But how would you fix this and properly add animated GIFs to WordPress? Let us explain.
How to Fix WordPress GIF not Working?
There are two simple methods that you can follow to add animated GIFs to WordPress without losing the actual animation itself.
1. Upload Full-Size Images
First, you need to select the post or page you would like to add GIFs to. If you are using the classic editor click on Add Media and if you have Gutenberg editor, simply create a new image block and upload the GIF that you want.
After uploading your GIF, choose “full size” under the “Attachment Display Settings” on the right-hand side.
Then insert into the post to continue. If you have followed the steps correctly, WordPress will insert the animated GIF into your post. Besides, you can see the preview right away.
2. Deactivate Image Optimization Plugins
As mentioned above, some image optimization plugins can enforce resizing on every single image/GIF you upload. Although, this depends on your configurations.
Image Optimization plugins are designed in a way to compress any image you upload and most of them don’t have any specific rule for animated GIFs.
So, they will automatically compress GIFs whenever you upload them. Some plugins even resize GIFs and as a result, the uploaded GIFs won’t be loaded properly and you will get an HTTP error. In another article, we have explained how to fix WordPress HTTP error.
If you have any image optimization plugins, deactivate them and try re-uploading the GIF you want. Make sure you also delete your cache after deactivating the plugin.
In most cases, these two methods work. But what if you want to compress GIFs before uploading them to your website?
How to Compress GIF Files for WordPress?
Compressing images and animated GIFs before uploading them on WordPress is very important SEO-wise and performance-wise. If you upload pictures that aren’t compressed, they can possibly slow down your website and increase the loading time browsers need to fully load your website.
According to statistics, most users won’t spend more than a few seconds for a website to fully load. Therefore, it is necessary to have compressed images on your website.
But how would you compress GIFs?
Well much like regular day to day images, there are tools designed specifically to compress GIFs for your convenience. EZGIF is a great website to compress and convert GIFs and regular images for your website. Simply go to the GIF optimizer tab and upload your GIF or paste its URL in the box. Then, click on upload. Once the process is finished, you can download your GIF.
GIF Compressor is another great website to compress GIFs for your website. This website comes with the drag and drop feature. So, not only you can upload your GIFs manually, but you can also drag and drop them into the designed box to compress them. You can upload multiple files at the same time and begin compressing them.
There are many other tools on the internet that you can use to compress images for your website. But we hand-picked the two mentioned above.
Where to Find Animated GIFs for WordPress?
Nowadays, GIFs can be found anywhere on the internet, you can find hundreds if not thousands of websites that are dedicated to sharing all sorts of GIFs.Two of the popular ones are Giphy and Reaction GIFs. These websites are completely different from one another. However, you can use the GIFs they upload for free and use them on your website.
Conclusion
In this article, we discussed why WordPress GIF is not working and how you need to approach it to fix the issue. Since WordPress generates 3 different sizes for each image you upload, it grabs the first frame of the uploaded GIF and uses it. So, your GIF will be converted into a static image.
This can be easily fixed by choosing the file size when you click on Add Media in the old editor and in the Gutenberg editor, GIFs seem to be fully supported and work perfectly fine.
One Comment Leave a Reply
thank you, this helped me to play my gif