Speed Up WordPress Avatars for Faster Page Load Time

All throughout childhood, we learned the value of patience and how it is a virtue. Even so, patience runs thin when we visit slow websites. As such, speeding up our blog is in the best interest of not only readers but also us. On this article, let me share how WordPress avatars in comments turn our pages into turtles. Also, I will propose a simple solution for faster page load time.

Who is this post for?

In relation to the topic of this article, it is for people who have a self-hosted WordPress site. In particular, it is for sites that allow commenting with Avatar Display turned on.

Importance of Page Load Time

As I alluded to earlier, a web page that takes forever to load can test our patience. With each passing second, here are our options.

1. Unleash a storm of expletives and continue waiting.

2. Leave the site.

Imagine if that is our blog with horrible site speed.

I am sure you will agree with me that as bloggers, we want people to visit and read our posts. Hence, the last thing we want is to have the audience choosing one of the two options above.

How much time are people willing to wait for a web page to load?

I came across an interesting study conducted by Akamai. While it was a study made for e-commerce websites, it does reflect the attitude of visitors as well as ours.

Back in 2006, they found out that on average, people were willing to wait for no more than 4 seconds. After three years, in a similar study, it was down to 2 seconds. No doubt, the wider availability of broadband has contributed to the increasing impatience.

How did I find out how fast or slow a blog page loads?

I used the free online tool from GTmetrix to test a previous blog post.

GTmetrix PageSpeed Before FV Gravatar CacheAs one can see, the PageSpeed score was 86%. One factor that stood out is Gravatar. At any rate, getting a B-grade remains acceptable.

GTmetrix YSlow Before FV Gravatar CacheYSlow disagreed with PageSpeed and gave an atrocious score of 72%. A C-grade, in this case, means that the post is not ideal for the audience.

In both metrics, the page load time took 4.2 seconds from a server in Vancouver, Canada. Compared to other sites, I can say that the loading time is decent but a little tweak can make it much better.

Blog Comments

Having people leaving comments lets us know how they feel about our posts. Depending on preference and purpose, some sites do not allow comments. As for those who do, some opted to disable the use of WordPress avatars.

In the test results that I showed you, there were 11 comments on the article on ideal blog post length. 8 of them were by the audience while three were my replies. All in all, there were five people, including me, using Gravatar images.

I like having a profile photo of commenters because it makes the comments more personal. Not to mention, it helps with the aesthetics as well.

Unfortunately, as one can see from the images I shared, it also affected the page load time.

At this point, I have three options.

1. Disable commenting.

2. Allow commenting but turn off WordPress Avatar Display.

Related Post
Benefits of Blogging for Filipino Writers

3. Do something about it.

Of course, I picked the third option, and I will also show you how I did it to speed up the page load time.

WordPress and Gravatar Images

Gravatar is a service owned by Automattic, the same team behind WordPress. Anyone who signs up and uploads a profile photo, it becomes available in their other services. It is why profile pictures appear in WordPress blog comments automatically.

Here is how it works.

When I leave a comment on a WordPress site, I leave the same email I used with Gravatar. If the Avatar Display option is on, the platform now connects to the servers of Gravatar to pull up my avatar.

From the test result, it is evident to me that the host connects to the remote Gravatar server several times. In fact, it looks to me that it does so for each comment.

It means that with more blog comments, the web page will have poorer page load time.

Once again, I have to make a decision. I can choose to turn off the blog commenting section. Another option is to close the comments after X number of days lapses since the publication date.

Like I kept alluding to, though, there is a way to improve the page load time.

Speed Up WordPress Gravatar

Sometimes, a complex problem requires only a simple solution. As such, there is no need to tinker with the code. As it turns out, all we need to do is to install a free plugin called FV Gravatar Cache.

It is a straightforward plugin that after installation. At the settings page, the only thing needed is to turn on the option for daily cron. Save the changes and let it work in the background.

Here is what it does.

The plugin visits Gravatar to download the commenters’ avatar and save to our server. It does so in the background so give it some time before it completes the task.

Once done, the web page can serve the images without the need to access a remote server. Hence, the blog page load time speeds up.

Here are the new scores on the same page I used earlier.

GTmetrix After FV Gravatar CacheHow about that?

PageSpeed is up to 93% while YSlow improved to 86%. Even better is the 36% increase in page load time. From 4.2 seconds, it is now down to 3.1 seconds.

Conclusion

Some people may think that shaving off a second is not a big deal. Believe me, it is.

Like I said, there were 11 comments when I checked the web page speed.

Imagine how much longer it takes with more blog comments.

Foliovision, the plugin developer, says it takes 100ms for each connection to Gravatar. In other words, it is as if every 10 comments will add 1 second to the page load time.

Beyond 4 seconds, each passing second increases the likelihood of the visitors leaving.

Do we want that for the blog we worked so hard on to get started and maintain?

Using Gravatar with WordPress does make the blog comment section look nicer. But it comes at a cost. In the end, the price we pay can be visitors not seeing our posts, or we can do something about it.

ROBERT LEE

Content Manager, Article Writer, Blogger

3 Comments
  1. Really interesting post, Robert! I’ve never given website speed much thought, but in hindsight, it makes sense. I normally get frustrated with slow pages and give up.

    Overall I found removing the gravatar made little difference to the overall website speed, but it did increase my Page Speed and YSlow score.

    What I found even *more* interesting is how I managed to halve my loading time (from 6.1 to 3.3 seconds) after I did a little more research into loading speeds and invested in some better cache plugins.

    Thank you so much. Your work is so valuable, and I’m not sure what I would do without you!

    1. Kylie,

      First thing I want to say is that in taking some steps, you ended up with a better-optimized site. Not only is it great for the mighty Google, but it is also to the benefit of the audience.

      I saw the screenshots you sent. Here are my thoughts:

      1. It will take a little bit of time before the FV Gravatar Cache can cache all the images it finds. As a result, there is less call to external sources (Gravatar servers).

      2. Your processes went down by some 40% resulting in less server load and faster page rendering.

      Also, GTmetrix does provide information on optimizing, and a little research is all it takes. Congratulations and well done on your high PageSpeed scores now.

  2. This post is truly helpful. It’s my first time hearing about GTMetrix and, since I don’t know how long it takes for our site to load, I immediately tried it before I finished reading your post. Our page speed is terrible as it’s in the C and E. I’m definitely having the FV Gravatar Cache installed in the next redesign of our site. Again, thank you so much for this kind of helpful content.

Leave a Reply

Your email address will not be published.