Any website built with WordPress uses Gravatar avatars. Gravatar is a globally shared avatar system. Once you set a Gravatar avatar, it will automatically display on any website that supports the Gravatar system. However, if your server is located in China, loading too many Gravatar avatars can slow down your website. The reason is that Gravatar servers have poor access speeds from within China. Therefore, to speed up WordPress, it's necessary for websites hosted on Chinese servers to either disable Gravatar avatars or cache them.
Disabling Gravatar Avatars in WordPress
Disabling Gravatar avatars is very straightforward. If your blog has a lot of comments, it's recommended to disable them, as too many avatar images can also slow down your website. The disabling method is as follows: 1. In the WordPress Admin Dashboard, go to Settings > Discussion. 2. Uncheck the box for "Show Avatars" to completely disable the Gravatar avatar feature in WordPress.

Caching Gravatar Avatars
Of course, if you completely disable Gravatar avatars and find the comment box unattractive, we can accelerate by caching Gravatar avatars. Caching Gravatar avatars locally on your server means users load avatars from your server, which is much faster. There are code versions online for caching Gravatar avatars, but many are outdated and not effective for every Theme. Beginners might not know how to modify them, so here are two recommended plugins for caching.
Gravatar Cache Plugin One: Harrys Gravatar CachePlugin download address: https://wordpress.org/plugins/harrys-gravatar-cache/
Gravatar Cache Plugin Two: FV Gravatar CachePlugin download address: https://wordpress.org/plugins/fv-gravatar-cache/ Using a plugin for caching is very simple: install the plugin, activate it, and configure the settings. If you have used
HummingbirdThis optimization plugin also supports avatar caching. Finally, if you have enabled Gravatar avatars, some themes do not add ALT descriptions to avatars by default. You can modify the code yourself to add them, which is more SEO-friendly. Method:
Add ALT attribute to Gravatar avatar images in WordPress comments
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.