How to Cache Gravatar Images in WordPress for Pagespeed [Easiest Way]

Updated on

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% to a web page. Then why not load these images properly?

Fastest WordPress Hosting Anywhere!

Most of the WordPress sites use gravatar images in the author’s profile and comments. These gravatar images look cool and make your site more authentic, but they come at a price.

How to Cache Gravatar Images in WordPress - TechNumero.Com
How to Cache Gravatar Images in WordPress

By default, the Gravatar Images are retrieved from 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 can make your web pages slow. Because the 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 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:

  1. Install and activate FV Gravatar Cache WordPress plugin from WordPress plugins directory.
  2. Go to Dashboard > Settings > FV Gravatar Cache.
  3. Set up the basic settings of the plugin. (as per screenshot below)
  4. 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.
  5. Once the caching is done. You can see cached images under Cache information.
  6. Finally, click Save Changes and you’re done.
FV Gravatar Cache WordPress plugin Settings - Technumero
FV Gravatar Cache WordPress plugin Settings

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:

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. Caching gravatar images will help to load your website faster and optimize your site speed. A 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.


You may also like:

Photo of author
Shashank Singh
Shashank is a web addict and amateur blogger. His current interests include blogging, SEO, and WordPress. See his social profiles to know him even better.
Disclaimer: Affiliate links of some product(s) are being used on this page, if you follow the link and make a purchase, we may receive compensation from respective companies. This compensation comes at no additional cost to you.

6 thoughts on “How to Cache Gravatar Images in WordPress for Pagespeed [Easiest Way]”

  1. Avatar of Shafi Khan

    Excellent share Shashank. I was looking for a solution to cache my Gravatar images and now I think I can handle it pretty easily.


    • Hi Shafi,

      I’m glad that it’s been helpful for you.
      Thanks for stoppin’ by.

  2. Avatar of John Mac

    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!

  3. Avatar of John

    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!


Leave a Comment

Your email address and website details will not be published. Required fields are marked with *.