Fix Guide

How to Disable Gravatar in WordPress (GDPR)

February 8, 2026

Gravatar sends hashed email addresses to external servers, which is a GDPR concern. Here's how to disable it and use privacy-friendly alternatives.

Method 1: WordPress Settings (Simplest)

  1. Go to Settings → Discussion in your WordPress admin.
  2. Scroll down to the Avatars section.
  3. Uncheck "Show Avatars".
  4. Click Save Changes.

This completely disables avatar display, including Gravatar requests.

Method 2: Replace Gravatar with Local Avatars

If you still want to display avatars but without Gravatar, add this to your functions.php:

// Disable Gravatar - use local default avatar instead
add_filter('get_avatar_url', function($url, $id_or_email, $args) {
    // Return a local default avatar
    return get_template_directory_uri() . '/images/default-avatar.png';
}, 10, 3);

// Prevent any DNS prefetch to gravatar.com
remove_action('wp_head', 'wp_resource_hints', 2);

Method 3: Use a Plugin

Several plugins handle this for you:

  • One User Avatar — Allows users to upload local profile pictures
  • Simple Local Avatars — Stores avatars locally on your server
  • Avatar Privacy — Comprehensive privacy-focused avatar solution

Verify with InspectWP

After disabling Gravatar, run a new InspectWP scan. The GDPR section should no longer show Gravatar as an active external service.

Check your WordPress site now

InspectWP analyzes your WordPress site for security issues, SEO problems, GDPR compliance, and performance — for free.

Analyze your site free