In addition to my previous post, we realized that this happened when the image was less than 450 px wide (BP_AVATAR_ORIGINAL_MAX_WIDTH). By changing this constant to 50px it works but everything is pixelated.
The problem must be related to the fact that when the image is smaller there is no resizing in the file bp-core-avatars.php ( $avatar_attachment->shrink( $bp->avatar_admin->original[‘file’], $ui_available_width );)