Learn how to cache gravatar images in WordPress to optimize your site speed. Why caching gravatar images can make a lot of difference to WordPress performance?
The website load time statistics show that images can contribute 43% of a web page. Then why not load these images properly.
Most of the WordPress sites use gravatar images in the author’s profile and comments. These gravatar images definitely look cool and make your site more authentic, but they come at a price.

By default, the Gravatar Images retrieve from gravatar.com to your website. Hence gravatar images increase the number of HTTP requests on your WordPress site. And thus make your website slow.
If there are a lot of comments on your blog posts, the default method of loading gravatar images from gravatar.com can make your web pages really slow. Because loading time of gravatar images of all the commenters will add up. Every time someone visits a blog post, all gravatar images will be loaded from gravatar.com. This does not seem like an efficient way of loading Gravatars, right!
You can leverage caching of Gravatar Images to overcome this problem.
Wait, did you just say that you are already using a WordPress cache plugin on your WordPress site?
Okay, but WordPress cache plugins do not take care of caching of gravatar images.
So, what should you do?
How to Cache Gravatar Images in WordPress
You can use FV Gravatar Cache WordPress plugin to cache gravatar images in WordPress. This plugin comes with some really useful features. Like… you can see cached gravatar images from the plugin’s Settings page itself. The plugin stores gravatar images on the server where your WordPress site is hosted. Hence cut down the number of external HTTP requests.
By default, the cache directory (to cache gravatar images) is under this plugin’s folder (wp-content/plugins/fv-gravatar-cache/images/). However, you can use the Custom Cache directory as well.
Step by step instructions to Cache Gravatar Images in WordPress:
- Install and activate FV Gravatar Cache WordPress plugin from WordPress plugins directory.
- Go to Dashboard > Settings > FV Gravatar Cache.
- Set up the basic settings of the plugin. (as per image below)
- Hit Run Cron Now, the plugin will start caching gravatar images in WordPress. It will take a while depending on the number and size of gravatar images.
- Once the caching is done. You can see cached images under Cache information.
- Finally, click Save Changes and you’re done.

You might be wondering what if somebody changed his/her profile image on Gravatar but your website is displaying his/her cached image from your server. You don’t need to worry about that, this plugin cache Gravatars with WordPress cron job and sync images after a certain period of time. All you need is to enable (check) Daily cron option in the plugin’s settings.
Since you are working on making your WordPress site load faster, you can consider:
- Deferring Offscreen Images in WordPress to Speed Up Your Website
- Make use of 7 Best Free CDN Providers for WordPress Website
Does your website show Optimize Images warning in Google Pagespeed Insights? Learn how to optimize images in WordPress properly.
If you are using gravatar images on your WordPress site, you must consider caching gravatar images. As caching gravatar images will help to load your website faster and optimize your site speed. Faster loading website is good for user experience as well as SEO and rankings of your website.
Are you sure? You Leverage Browser Caching in WordPress for Best Performance.
I hope this article helps you to cache gravatar images in WordPress to speed up your site. If you are using some other method or plugin to cache gravatar images in WordPress, feel free to share with me and other readers via the comment section below.
Cheers!
You may also like:
Excellent share Shashank. I was looking for a solution to cache my Gravatar images and now I think I can handle it pretty easily.
Thanks!
Hi Shafi,
I’m glad that it’s been helpful for you.
Thanks for stoppin’ by.
Hi, I have tried the plugin as per your recommendation but still, it’s not leveraging browser caching as expected. This can be seen from the report of Google pagespeed.
Hey John,
Make sure you have hit the Run Cron Now button after installing the plugin. Also, clear all the cache from the cache plugin (if using any) before installing this plugin. Hope it helps. Thanks for stopping by!
I am having to same trouble as John Mac above. Gmetrix is showing 0 change, but when looking at the source I do see them being pulled down from my site and not gravatar. Any reason why?
Also, messages from “Anonymous” did not cache and are still pulling from gravatar. Any way to fix that?
Thank you!
Hey John,
If the source is showing that gravatars are being cached. You should try testing clearing up cache in cache plugin and browser. And then try testing the site after some time. Looking forward to hearing more from you.
Thanks for dropping by!