@brightwash
7 years, 10 months ago
define ( ‘BP_AVATAR_DEFAULT_THUMB’, $img_url );
This was not working for me either, in the end this combination did. Turning off gravatar (first filter), and then a default bp image filter.
add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' ); add_filter( 'bp_core_default_avatar_user', 'override_default_avatar', 10, 2 ); function override_default_avatar( $default, $params ) { if ( !empty($params) ) { if ( 'thumb' == $params['type'] ) { return get_stylesheet_directory_uri() . '/img/avatar-thumb.jpg'; } } return get_stylesheet_directory_uri() . '/img/avatar.jpg'; }