Not sure if this is what you were looking for or if you’ve already found out but I’ll leave it here anyway.
I’ve used this: get_wp_user_avatar_src
I see you are using _url but _src is the one you need.
function get_team_avatar_url( $id )
{
// Just in case wp_user_avatar is disabled, check if exists.
return function_exists(get_wp_user_avatar_src) ? get_wp_user_avatar_src($id) : get_avatar_url($id);
}
Ver.1.9.13 – Since ver: 1.8 – /wp-user-avatar/includes/wpua-functions.php – Line:48
function get_wp_user_avatar_src($id_or_email="", $size="", $align="") {
global $wpua_functions;
return $wpua_functions->get_wp_user_avatar_src($id_or_email, $size, $align);
}