Of all the WordPress cache plugins we use, none of them cache Gravatar, and we miss out on another step of WordPress optimization. One solution is to not use Gravatar at all, but I wouldn’t suggest that as it helps in the branding of your authors and commentators.

Also, it makes comments look more genuine, as images add another level of trust.

So what’s the best way tocache Gravatar in WordPress?

FV Gravatar Cache WordPress Plugin:

FV Gravatar Cache is a simple WordPress plugin which easily caches Gravatar. This is a plug and play plugin; once you enable it, you only need to make some changes according to your need.

For example, you can define a custom location for cached Gravatar images. Also, depending on your theme, you can also define the size of the Gravatar which you want to cache. It’s a good idea to keep it the same as what you are using in your comment boxes.

I installed this plugin a few months back, but today after moving to Knownhost, when I was cleaning my site’s backend, I found this plugin and realize it’s very useful for every WordPress blog.

If you are showing Gravatar images on your blog, you should go ahead and install this plugin.

You can download this WordPress plugin from the official WP repo here. Also, if you would like to speed up your site further, you should disable the Gravatar Hovercard feature from the WordPress Discussion settings.

Subscribe on Youtube

"Shouting since 2008"
Harsh Agrawal is the founder & CEO of ShoutDreams, INC.
A blog scientist by mind and a passionate blogger by heart. His blog, ShoutMeLoud receives 1.5 million Pageviews/month and has over 832K subscribers.

COMMENTs ( 5 )

We’re the authors of FV Gravatar Cache. If you have really crap hosting and an already overloaded website (too many plugins, too many files), then caching gravatars locally will make a bad situation worse.

On the other hand, if you’ve got a fast server and a well-coded site, locally cached gravatars on comments will load much more quickly as they are called as simple image files and don’t go through the identification process which takes place on the gravatar site (which is often overloaded and slow in any case).

As Harsh notes, FV Gravatar Cache plays nicely with other caching plugins. It’s meant to work well with others. If you have a site with a lot of comments on decent hosting, FV Gravatar Cache will really speed up page loads.

Hey,
What is the point of using cache plugin to cache images ? Instead of loading 20 different avatars from superfast gravtar servers(CDN), it’ll load from ours. Loading from multiple servers is always a good idea.
Caching gravtar is useless unless we can treat locally cached gravtars as a fallback . If one is running on low end server then he might do a lot more damage than good.
How the Google hosted JS libraries are preferred by many web developer over locally hosted JS files. Same applies to the Gravtar,

Amit, apparently you have not used Google PageSpeed insights on your site(s). The gravatar loading doesn’t have “proper” expiration headers, with an expiry time of only 5 minutes. This comes up as an “error” with a score penalty for page speed. By caching comment gravatars locally, a site with MANY comments, loads the local images vs pulling from the outside server as may as 20 times for one page, which is terrible for page speed.