Gravatar stands for Globally Recognized Avatar and it’s a nice piece of technology which allows site visitors to maintain a bit of personality across the internet by putting on the same avatar to the comments on all the sites which have Gravatars enabled. Gravatars are an Automattic property but Automattic for the moment are administering the Gravatar site as non-commercial, allowing WordPress and other sites to use them.
We highly recommend using Gravatars on most WordPress site.
There’s one problem with Gravatars. They are very slow to load. Each page with comments on them makes one call per comment to the Gravatar server. While a single call takes only a 100ms, on a page with hundreds of comments, we are talking about major slowdowns. Page loads can take 20 seconds and more.
Here’s what a standard Gravatar URL looks like:
As at Foliovision we run many sites with high comment levels we needed to find a solution to these slowdowns. Our solution: cache all the gravatars locally.
After installing FV Gravatar Cache, that 20 second page load for a page with a hundred fifty comments should be down to about 5 seconds.
Keep in mind that if you already have a lot of comments on your site it can take between five hours and two days for FV Gravatar to cached all the existing comment gravatars. Any new gravatars will be cached instantly with comment save.
More Technical: How this plugin works
- Caches non-cached and updates cached gravatars in 5 minute intervals.
In each interval 25 gravatars are processed. That means in one hour 300 gravatars are updated. So if your site has 3000 unique comment authors, all the gravatars are updated every 10 hours.
- Caches gravatars on comment submission
This makes sure new site visitors get they properly cached gravatars right away.
- You need to specify the desired size of the gravatars
The default WordPress value is 96, but this is a matter of your templates. It’s best to check out the original gravatar size in your browser first.
- If no gravatar for email address is found, the default gravatar is used
This is good, because normally WordPress has no idea if there is any gravatar for some email address, so you end up with loading the same default gravatar for each user with no gravatar over and over again. That slows down your page loads.
WordPress version above 2.7. Compatible up to 3.0.1.
Download from WordPress plugins – FV Gravatar Cache.