How to Disable Gravatars in WordPress (Step by Step Tutorial)

How to Disable Gravatars in WordPress (Step by Step Tutorial)


Shares

47

Share

Tweet

Share

Facebook Messenger
WhatsAppEmail

Do you want to disable Gravatars in WordPress? WordPress uses the third-party Gravatar service to display user profile photos, which allows users to have the same profile photo across different websites.

Gravatars are very useful, particularly in WordPress comments. However, we’ve heard from many users who prefer not to use Gravatars at all.

In this article, we will show you how to easily disable Gravatars in WordPress. We’ll also show you how to use local avatars instead.

Disable Gravatars in WordPressDisable Gravatars in WordPress

Why Disable Gravatars in WordPress?

Gravatar is a third-party service that allows users to add a profile photo to their WordPress website and use it across the internet.

Basically, you create an account and then upload your profile photo.

Managing Gravatar profileManaging Gravatar profile

After that, whenever you use that particular email address on a website that supports Gravatar, it will automatically show your profile photo from the Gravatar website.

To learn more, you can see our explainer on what Gravatar is and why you should use it.

However, some website owners may not want to use Gravatars for several reasons.

For instance, they may want to turn it off to improve website performance and speed. Similarly, some site owners might not want to use Gravatar due to privacy concerns.

That being said, let’s take a look at how to easily disable Gravatars in WordPress. We’ll show you how to disable Gravatars completely using two different methods, as well as how to replace them with local avatars:

  • Method 1: How to Completely Disable Gravatars Using WordPress Settings
  • Method 2: How to Completely Disable Gravatars in WordPress Using a Plugin
  • How to Replace Gravatar With Local Avatars in WordPress

Method 1: How to Completely Disable Gravatars Using WordPress Settings

WordPress makes it super easy to customize or turn off Gravatars on your website.

First, you need to log in to the admin area of your website and then go to the Settings » Discussion page.

From here, you need to scroll down to the Avatars section and uncheck the box next to the ‘Show Avatars’ option.

Turn off Gravatars in WordPressTurn off Gravatars in WordPress

Don’t forget to click on the ‘Save Changes’ button to store your settings.

WordPress will now disable Gravatars across your website. You will now see a generic user icon in the admin toolbar instead of your Gravatar image.

User profile photo disabledUser profile photo disabled

Similarly, Gravatars will no longer be shown alongside comments.

If you go to the Comments page in your WordPress admin area, then you won’t see the Gravatars anymore.

Comments page without Gravatar imagesComments page without Gravatar images

The same is true on your website’s front end.

WordPress will stop showing Gravatar images in the comments area under the posts and pages on your WordPress blog.

Comments without GravatarsComments without Gravatars

Method 2: How to Completely Disable Gravatars in WordPress Using a Plugin

Another way to disable gravatars in WordPress is by using the WPCode plugin. This method is best for users that want to use custom code to make additional customizations to their WordPress site.

WPCode makes it easy to add custom code in WordPress, without editing your theme’s functions.php file, so you don’t have to worry about breaking your site.

It also comes with a library of 1,500+ ready-made code snippets for popular feature requests like disabling Gravatars, setting a minimum word count for posts, disabling the Gutenberg editor, and more.

First, you need to install and activate the free WPCode plugin. If you need help, you can see our guide on how to install a WordPress plugin for instructions.

Upon activation, go to Code Snippets » Library from the WordPress admin dashboard.

From there, search for the ‘Disable Gravatar Avatars’ snippet and click the ‘Use snippet’ button underneath it.

Select the snippet for disabling Gravatar avatars from the librarySelect the snippet for disabling Gravatar avatars from the library

WPCode will then automatically add the code and set the proper insertion method.

WPCode will automatically add the codeWPCode will automatically add the code

After that, all you need to do is toggle the switch from ‘Inactive’ to ‘Active’ and click the ‘Update’ button.

Switch the toggle to 'Active' and click the 'Update' buttonSwitch the toggle to 'Active' and click the 'Update' button

That’s it. Now Gravatar avatars will be completely disabled in WordPress.

How to Replace Gravatar With Local Avatars in WordPress

Some users may want to disable Gravatar but still display profile photos under author bios and other places.

This allows you to keep the avatar functionality in WordPress and enables users to upload their own profile photos. At the same time, it disables Gravatars and prevents your website from making any requests to the Gravatar website.

To do this, you will need to install and activate the Simple Local Avatars plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Settings » Discussion page and check the box next to the ‘Local Avatars Only’ option.

Allow Local Avatars OnlyAllow Local Avatars Only

Don’t forget to click on the ‘Save Changes’ button to store your settings.

The plugin will now block any requests to Gravatar.com while allowing you to keep avatar functionality.

To upload profile photos, your users will need to add their own images on their user profiles.

They will simply go to the Users » Profile page. From here, they can use an image from the WordPress Media Library or add a new image by uploading it to the Media Library.

Adding a Local AvatarAdding a Local Avatar

Don’t forget to click on the ‘Update Profile’ button to save your changes.

WordPress will now use custom profile photos instead of Gravatars. For all unregistered users, it will show the default avatar image you have set in the settings.

For all registered users, WordPress will use the custom avatar image that the user uploaded. If a user hasn’t uploaded their custom avatar image, then the plugin will use the default avatar image.

Once a user has chosen a local avatar, their Profile page will offer buttons to select a different image from the Media Library or remove the local avatar.

Changing or Removing a Local AvatarChanging or Removing a Local Avatar

Our Best Guides for Using WordPress Gravatars

Now that you know how to disable Gravatars and add local avatars, you might like to see our other tutorials on using Gravatars and avatars in WordPress:

  • What is Gravatar and Why You Should Start Using it Right Away
  • How to Display Gravatar from User Email in WordPress
  • How to Change the Gravatar Image Size in WordPress
  • How to Change the Default Gravatar on WordPress (Easy Tutorial)
  • How to Lazy Load Gravatars in WordPress Comments
  • How to Add an Author Info Box in WordPress Posts

We hope this article helped you learn how to disable Gravatars in WordPress. You may also want to see our guide on how to add additional user profile fields in WordPress registration and our comparison of the best WordPress page builder plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


Shares

47

Share

Tweet

Share

Facebook Messenger
WhatsAppEmail
Lượt xem: 14

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *