I’ve been looking for a way to change the default Buddypress avatar for members, and have managed it, partially just using the simple Buddypress codex info here.
BUT
The codex info doesn’t quite do the trick. It seems that Gravatar overrides it, so the only way the codex code works is if I first disable gravatar.
The issue that I’m now facing is that in disabling gravatar for buddypress, it disables it across the site so normal wordpress users (say admins/editors) can’t edit their avatars through the backend user profile space of wordpress, because it’s setup so you can “change your profile picture on gravatar.”
BUT
All users could go to their buddypress account page (which we all automatically have no matter how we signed up as long as we have a user account on the site) and they can change their avatar there, which affects it throughout the site.
It’s all kinda ok, but not quite right.
So I’m wondering if anyone has a solution that would allow me to set a new default buddypress avatar without having to completely disable gravatar.
Here’s the code within the bp-custom.php file:
<?php
// disable gravatar
add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' );
//change Buddypress default avatar
define ( 'BP_AVATAR_DEFAULT', 'http://localhost/mysite/wp-
content/uploads/2017/08/profilpic.png' );
define ( 'BP_AVATAR_DEFAULT_THUMB', 'http://localhost/mysite/wp-
content/uploads/2017/08/profilpic.png' );
?>