Gravatar is a service which comes pre-loaded with every WordPress blog.
All those images you see in comment form here at ShoutMeLoud, or most any WordPress blog, comes from Gravatar.com.
Now, one problem with using Gravatar is that it increases the loading time by performing a DNS query, thus slowing down our site.
If you are new to Gravatar, you should read my earlier post: Gravatar Adds Images To WordPress Comments & Profiles.
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 to cache 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.
Here is a screenshot of the settings page of the FV Gravatar Cache plugin:
After the first set up, you should click on “Run Cron Now” to start caching images from Gravatar. You can refresh the page to see the total number of cached images.
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.
Do you know any more caching plugins for WordPress which will help us to speed up our websites? Share them with me in the comments!
Don’t forget to share this post!