Mastering WordPress: A Step-by-Step Guide to Disable Gravatars Effectively

Do you want to get rid of gravatars from your WordPress site? Learn how to easily disable gravatars in WordPress without writing any code.

We once experienced a blog post that went viral, which brought a surge of traffic, but it also caused our site’s speed to plummet. We found that the issue was due to the numerous comments loading, each making an external request for a Gravatar image.

Those small, gray default profile pictures may appear innocuous, but they can considerably hinder your page loading times. Disabling them provided our site with an immediate and significant performance improvement, particularly on posts with high reader interaction.

In this guide, I will outline the straightforward methods we employ to disable Gravatars in WordPress. Let’s enhance your site’s speed! 🚀

Reasons to Disable Gravatars in WordPress

Gravatar is a third-party service that enables users to add a profile picture to their WordPress site and use it across various platforms on the internet.

Essentially, you create an account and upload your profile picture.

Subsequently, whenever you use that specific email address on a site that supports Gravatar, your profile picture will automatically appear from the Gravatar platform.

For more information, check out our detailed explanation of what Gravatar is and the benefits of using it.

However, some website owners may choose not to utilize Gravatars for a variety of reasons.

For example, some website owners choose to disable Gravatars to enhance their site’s performance and loading speed. Others may have privacy concerns, as each comment with a Gravatar sends a request to an external server.

Now, let’s explore how to easily turn off Gravatars in WordPress. We will guide you through two different methods to completely disable Gravatars, as well as show you how to substitute them with local avatars.

  • Method 1: How to Completely Disable Gravatars Through WordPress Settings
  • Method 2: How to Completely Disable Gravatars in WordPress Using a Plugin
  • How to Replace Gravatars with Local Avatars in WordPress
  • Frequently Asked Questions About Disabling Gravatars

    Method 1: How to Completely Disable Gravatars Through WordPress Settings

    This is the fastest and simplest way to turn off Gravatars, making it ideal if you prefer not to install an additional plugin. WordPress allows you to do this easily from your settings.

    First, log in to your website’s admin area and navigate to the Settings » Discussion page.

    Next, scroll down to the Avatars section and uncheck the box next to the ‘Show Avatars’ option.

    Remember to click the ‘Save Changes’ button to apply your settings.

    Gravatars will now be disabled throughout your website, and you’ll see a default user icon in the admin toolbar instead of your Gravatar image.

    Additionally, Gravatars will no longer appear next to comments.

    When you visit the Comments page in your WordPress admin area, you won’t see Gravatars displayed anymore.

    The same applies to the front end of your website.

    WordPress will no longer display Gravatar images in the comments section of your blog posts and pages.

    Method 2: Completely Disable Gravatars in WordPress Using a Plugin

    Another method to turn off Gravatars in WordPress is by utilizing the WPCode plugin. This option is perfect if you’re already using WPCode for other customizations, allowing you to keep everything organized in one secure location, separate from your theme files.

    WPCode simplifies the process of adding custom code in WordPress without the need to edit your theme’s functions.php file, eliminating the risk of breaking your site.

    At CanadaCreate, we rely on WPCode to manage all our code snippets, enabling our team to add new features safely without the risk of errors in theme files.

    Begin by installing and activating the free WPCode plugin. If you need assistance, refer to our guide on how to install a WordPress plugin for detailed instructions.

    Once activated, navigate to Code Snippets » Library in the WordPress admin dashboard.

    Next, look for the ‘Disable Gravatar Avatars’ snippet and click the ‘Use snippet’ button located beneath it.

    WPCode will automatically insert the code and configure the appropriate insertion method.

    Then, simply switch the toggle from ‘Inactive’ to ‘Active’ and click the ‘Update’ button.

    That’s all! Gravatar avatars are now completely disabled on your WordPress site.

    How to Replace Gravatar with Local Avatars in WordPress

    Some users may wish to disable Gravatar while still displaying profile pictures in author bios and other areas.

    This method allows you to substitute Gravatars with your own locally hosted profile pictures instead of removing them altogether. This prevents your website from making requests to the Gravatar site while enabling users to upload their own profile images directly to your site.

    To accomplish this, you will need to install and activate the Simple Local Avatars plugin. For further information, check out our step-by-step guide on how to install a WordPress plugin.

    After activating the plugin, navigate to the Settings » Discussion section and select the ‘Local Avatars Only’ option.

    Make sure to click the ‘Save Changes’ button to apply your settings.

    The plugin will now prevent any requests to Gravatar.com while still allowing avatar functionality.

    To upload profile pictures, users must add their own images to their profiles.

    They can do this by going to the Users » Profile section. Here, they can choose an image from the WordPress Media Library or upload a new image directly to the Media Library.

    Remember to click the ‘Update Profile’ button to save any changes.

    Now, WordPress will display the local avatars you’ve enabled. Registered users who have uploaded a profile picture will see their chosen image.

    For unregistered commenters or registered users without an uploaded avatar, WordPress will show the default avatar you selected in your settings.

    For all registered users, WordPress will display the custom avatar image that the user uploaded. If a user has not uploaded their custom avatar, the plugin will revert to the default avatar image.

    After a user selects a local avatar, their Profile page will provide options to choose a different image from the Media Library or to remove the local avatar.

    Common Questions About Disabling Gravatars

    Below are some frequently asked questions regarding the process of turning off Gravatars in WordPress.

    1. Why should I turn off Gravatars in WordPress?

    The primary reason is to enhance your website’s speed and performance. Each Gravatar is loaded as a separate external request, which can slow down your pages, particularly those with numerous comments.

    2. Will turning off Gravatars remove any comments from my site?

    No, it will not. Disabling Gravatars only affects the profile images. All your existing and future comments will remain completely intact.

    3. What image appears after I turn off Gravatars?

    WordPress will show the default avatar you have selected under Settings » Discussion. This is usually the standard ‘Mystery Person’ icon unless you have selected an alternative.

    4. Is it more beneficial to disable Gravatars or to lazy load them?

    To achieve the best performance, it’s recommended to disable Gravatars as this removes all external requests. If you prefer to retain profile images, consider implementing lazy loading, which improves initial page load times. For more information, check out our guide on how to lazy load Gravatars.

    Top Resources for Utilizing Gravatars in WordPress

    We trust this article has helped you understand how to disable Gravatars in WordPress. You may also be interested in exploring additional tutorials on using Gravatars and avatars in WordPress:

    • Understanding Gravatar: Why You Should Start Using It Immediately
    • How to Display a Gravatar Using User Email in WordPress
    • Adjusting the Gravatar Image Size in WordPress
    • A Simple Guide to Changing the Default Gravatar in WordPress
    • Implementing Lazy Loading for Gravatars in WordPress Comments
    • How to Create an Author Info Box in WordPress Posts

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

    Share This Post
    DMCA.com Protection Status Chat on WhatsApp