Skip to:

Remove Everything Gravatar

  • @mcuk


    Hi all,

    Want to totally remove the use of Gravatars and calls to external servers for them (user privacy/data reasons etc). Also want to encourage users to upload photo themselves.

    Just want to know if the code below is still applicable or is it outdated (published in 2011):
    I have tried sticking it in bp_custom file but there is an unexpected ; somewhere in the first function which produces an error.

    If the above is outdated will this suffice (or are calls still made to 3rd party servers):
    add_filter('bp_core_fetch_avatar_no_grav', '__return_true');


    WP 4.2

Viewing 6 replies - 1 through 6 (of 6 total)

  • Henry Wright


    For just BuddyPress (not the WordPress side of things), see comment 4 here:



    asked about this with some help over a year ago ( )

    short term fixes some though:

    Which I have installed but not activated yet.

    Also mentioned this a while back in a survey thread I think it was ( buddypress. org/support/topic/questions-for-the-2015-buddypress-survey/#post-229073

    and in buddypress .org/ support/topic/programmatically-assigning-avatars-to-groups/#post-182810

    Glad to see there was some ticket discussion about this issue! And others who are looking at this being a real problem!



    You can use that filter, which was introduced by BP 1.7

    See also (members+groups) (network)

    BuddyPress Force Profile Photo



    Thanks @henrywright! I’ll stick with add_filter('bp_core_fetch_avatar_no_grav', '__return_true'); then if it’s all I need to stop the Buddypress calls. What is it that WordPress calls for? Are you referring to the default ‘white figure on grey background’? Or does WordPress also check for a Gravatar in similar way to Buddypress. (I don’t currently use Gravatar).

    Hi @djsteveb , I came across some of those posts you listed which is actually what got me thinking about it in the first place :). I’m trying to be as transparent as possible on user privacy/data on the site I’m creating. Searched the forums a little further and some of the threads are v old so thought I’d check if the stuff there was still applicable or had been deprecated.

    Hi @danbp, thanks for the plugin suggestions. I’ve come across a few Buddydev plugins and will probably use their ‘bp-activity-comment-notifier’ plugin since they aren’t part of Buddypress default currently. Trying to keep plugins to a minimum early on.
    With regards to the ‘bp-avatar-suggestions’ plugin (which you appear to have inspired), does that override any WordPress calls Henry mentioned above since you are using your own locally stored images? (similar I guess to the new user Twitter eggs)?



    WordPress use Gravatar like BuddyPress.
    When BP is activated, it let’s you manage your avatar from the profile.

    WP is using get_avatar and BP substitute it with his own code for internal purpose.

    Bp-avatar-suggestion let the site admin add an avatar bunch of pictures where users can choose from instead of uploading their own image. And yes, all avatars (wp/bp) are concerned, even if in fact it is the same thing.

    FYI the ‘white figure on grey background’ is called Mystery Man in WP jargon. 😉

    Also, Gravatar is an external service and on some config, this can slow down a site. Nothing new, it’s the case for any external service (js, font, cloud, social share, etc)

    By using the define, you deactivate the call to external gravatar service, and BP fires a local copy of the mystery man. Deactivating Gravatar will also deprive the people who use the service to get their usual picture on your site. It’s not an innocent decision.

    Be aware also that the empty option (in wp default avatar setting) is a blank image (and not an empty space), which is also fired by Gravatar.

    World isn’t perfect. 😉



    Thanks for the explanation @danbp. Ahhhh the Mystery Man ha.

    WP is using get_avatar and BP substitute it with his own code for internal purpose.

    So if i understand you, WP calls for the user’s Gravatar regardless via get_avatar and Buddypress then just takes it from WP to make it appear on the user profile? Therefore the code add_filter('bp_core_fetch_avatar_no_grav', '__return_true'); only stops the second part of the process where Buddypress requests the user’s Gravatar from WP. That right?

    Deactivating Gravatar will also deprive the people who use the service to get their usual picture on your site. It’s not an innocent decision.

    Yeah I agree. The reasons I have now for wanting to prevent access to Gravatar is for data/privacy/3rd party website reasons and also slowdown (if the user numbers did reach certain levels). I don’t want to ‘force’ them to upload a profile pic because I want them to give as little or as much to their profile as they feel like (which is why I wouldn’t use the Buddydev force profile pic plugin either).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Everything Gravatar’ is closed to new replies.
Skip to toolbar