Code Snippets

Completely disable the use of Gravatars on your BuddyPress site

Update: New versions of BuddyPress (1.7+) only need to add the following snippet to their bp-custom.php file

Gravatars are pretty darn great in general. But for certain communities there might be privacy reasons to disable them. BuddyPress let’s you do this, but it does not stop the calls being made to the Gravatar servers. This can sometimes lead to slower page loading times, and thus the people at came to the rescue! It took them a while to figure it out, but Scabadaska found a way to do it! Below is the complete code you need to put in functions.php or bp-custom.php. Enjoy!

Tired of having a slow BuddyPress site?

I'm constantly updating my BuddyPress Hosting Guide to help you get the most out of your hosting. SiteGround and WPEngine have proven to be fast and reliable but see my BuddyPress Hosting guide for a full overview of your options


40% Discount on the first year of BuddyPress hosting on WPEngine!

Currently WP Engine is running a promotion where they give 40% discount for the first year of hosting on any of their plans. Use code SSL40OFF on Personal, Professional, or Business plans on WP

About Bowe Frankema

Building communities on BuddyPress is something I am very passionate about. The decision to focus exclusively on BuddyPress projects over the last few years inspired me to share back some of the things I've learned here on BP-Tricks! You can find me on WordCamps & BuddyCamps across the globe and on Twitter! Follow me on Twitter


11 responses to ‘Completely disable the use of Gravatars on your BuddyPress site

  1. I’m looking at this and I’m trying to think of a way to include a check to see if the user has entered the gender profile field and have 3 mystery default images depending on what was selected M/F/ or none and show the corresponding mystery avatar as default. Any Ideas.

  2. Someone can tell why the code after making avatars disappeared, although in the path of such a file exists. Sorry for my english

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">