What is Gravatar?
Gravatar stands for Globally Recognized Avatar. It is a small picture that appears on the comments, author bio, forum posting and many other places on a WordPress site. Gravatar is a free service offered by Automattic Inc, the company that runs WordPress.com and supports the open source projects like WordPress.org.
You should have a WordPress.com account in order to use gravatar for your email id. The gravatar image is displayed on all services using gravatar API that is free to use. Below is an example of gravatar image displayed in author information. The look, size, color can be adjusted with custom CSS which is generally controlled inside your theme or plugin.

How to Create Gravatar?
The first step is to have a WordPress.com account. You should already have an account if you are using Jetpack or any other plugins associated with WordPress.com. If you don’t have one, then go to WordPress.com site and create an account. After that, login to gravatar.com with your WordPress.com account details. Navigate to “Add avatar image” option available under the dropdown of your email address.

You can have multiple emails under the same account and add different gravatar images for each email ids.
- Click the “Add email” button to add an additional email address or select your existing address.
- Click “Upload image” button to add an image, crop to the needed size and choose the rating.
- Check the profile card preview and that’s it!!!

You can anytime change the email and assign different profile image.
How to Use Gravatar on WordPress.org Site?
Login to WordPress admin panel and navigate to “Settings > Discussion” menu. Activate the “Show Avatars” checkbox under “Avatar Display” section.

Choose the rating of your avatar image, WordPress offer the following ratings for the image:
- G – Simple image suitable for all age of audiences
- PG – Offensive image suitable for age 13 and above
- R – Adult image for age 17 and above
- X – More violent and adult image above R rating
You can also choose one of the default available images. This image will be displayed when the user email is not associated with any gravatar image.
Gravatar Hovercard
By default, only the image will be displayed when an associated email with gravatar account is used. In addition to this you can optionally showcase the linked profile on hover as shown below.

Install and activate Jetpack plugin. Navigate to “Jetpack > Settings” menu and look for the module called “Gravatar Hovercards”. Activate this module for showing gravatar profile when hovering over the gravatar image.

How Gravatar Works?
The email id used on the gravatar account is converted to a string referred as hash. Let us take an example of an email id “[email protected]” registered with gravatar site. This email is converted to a hash value, say “abcd”. Now you can get the gravatar picture just by using HTTP GET requests with an IMG tag as below:
<img src="https://www.gravatar.com/avatar/abcd?s=250" />
In the above code:
- “abcd” is the calculated hash value
- The corresponding email id is “[email protected]”.
- S=250 is used to resize the picture to 250px size.
When gravatar is enabled on your WordPress.org site, the platform will use the above method to fetch gravatar image related to your email id.
Problems in using Gravatar
Though the image looks attractive and used by almost all of the commenting plugins available on WordPress.org, there are points to be considered before you activate gravatar.
- Gravatar API does not have any authorization, which means anyone knows your email id can enter comments and your picture will be displayed without your permission.
- Generally gravatar images are not cached which will lead to slow page loading. You can see this problem when using Google PageSpeed Insights tool under “Leverage browser caching” section.
- Services from WordPress.com is blocked in some of the countries, hence the small image can take long time and delay the page loading considerably, especially when the page has hundreds of comments.

- Displaying gravatar on mobile devices will make your comments more congesting and non-readable. You can use custom CSS media queries and hide the gravatar images on mobile devices.
How to Use Custom Gravatar Image?
If you want to show an avatar image but not interested in using the one from gravatar.com or don’t want to create wordpress.com account, then you can use a custom image option.
- Install and activate One User Avatar plugin on your site.
- Go to “Users > Profile > Profile Picture” section and upload a custom image for your profile.
- Scroll down to the bottom and click “Save Profile” button.

- Go to “Avatars > Settings” section and check “Disable Gravatar and use only local avatar” option.
- Make sure “Show Avatar” option is checked against “Avatar Display” heading.
- Choose your “Default Avatar” image to be shown in the comments for the users without custom picture.
- Click “Save Changes” button to start showing your custom profile image in author box.





