How to Display Gravatar from User Email in WordPress
Gravatar has made avatars easier. Like most WordPress powered websites, we also use Gravatar in comments to show the globally recognized avatar of each comment author. Don’t know what is a gravatar? Then read: What is Gravatar? Even though most sites only use Gravatars in the comments, you can quite frankly use it anywhere you like to display any user’s profile picture. For example, in the author bio box, or in the sidebar, or in the about page. In this article, we will show you how to display Gravatar from user email in WordPress.
How to Display Round Gravatar Images in WordPress
This should work on most WordPress themes. However, if this does not work on your theme, then there is probably some plugin or your theme function messing with the default classes used for gravatar in WordPress. In order to find out which css class gravatar images are using in your theme, you need to open a blog post that has comments. Scroll down to the comments section, and right click on the gravatar image to select Inspect Element. It will show you the source code for your gravatar, like this:
Setting up Gravatars on your site is easy; you don’t even need an account! Plugins are available for leading blog software and content management systems, and our tutorials will have you running Gravatars in no time.Example Plugins and Code →
How to display author (user) avatar in WordPress
WordPress fetches this avatar automatically from your Gravatar.com profile which is WordPress default service for avatars. This avatar will be shown inside your author widget, comments section…basically wherever your WordPress theme allows you to display it.
How to enable Gravatar in WordPress?
Gravatars are Globally Recognized Avatars which we can enable on our WordPress blogs. You can see that on many blogs, users have their images next to their comments, these are called avatars and we can set an avatar to be used automatically every time we comment on any blog. Any one can register with Gravatar and create his/her profile and upload his image. Every time that person comments on a blog which has Gravatars enabled, his image will be shown next to his comment.
This page was moved to https://wordpress.org/support/article/how-to-use-gravatars/ except above language locator.