Im using a custom WP plugin (ProUser) to upload user avatars. The avatars work perfectly everywhere on my wordpress site except for buddypress. I have been doing a lot of searching and it seems buddypress handles avatars in its own (fairly ruthless) way! Does anyone know how to override the buddypress user avatars (but not group avatars), so that these are the same as elsewhere in the instillation (eg as found on bbpress, dashboard, etcâ¦).
As far as my reading has got me this will probably involve overriding or rewriting âbp_core_fetch_avatarâ to use âget_avatarâ in buddypres. I have been trying to do this but im not great with php and not getting very far. Any help would be really appreciated.
Thanks.
You would have to replace all instances of
bp_core_fetch_avatar()
in your templates withget_avatar()
. To my knowledge, this would be the only (and best) way of doing it.Not sure if this will answer your question exactly (i’ve no experience with pro user or group avatars) but here we go..
In bp-custom.php add..
This tells buddypress to ignore ‘gravatars’ and use the avatars uploaded to wordpress.
Better explained here by the person who came up with this solution..
https://stackoverflow.com/a/34560419/3377049
Start by unhooking
bp_core_fetch_avatar
from thebp_get_activity_avatar
calls viaand then writing & adding your own filter to
bp_get_activity_avatar
that leveragesget_avatar
.