# BuddyPress: Don't Load Gravatar for Member Avatars

> Stops BuddyPress from requesting Gravatar images for members without an uploaded photo and uses the local mystery-person image instead, for privacy and speed.

- Type: PHP
- Runs: Run everywhere
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: buddypress, avatars, privacy
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/buddypress-no-gravatar-fallback/

## Code

```php
if ( ! function_exists( 'buddypress' ) ) {
    return;
}

add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' );
```

## Notes

Members who upload their own profile photo are not affected.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "BuddyPress: Don't Load Gravatar for Member Avatars" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
