If you have used BuddyPress, You already know that BuddyPress allows user to upload their own image for avatar/group avatar.
By default, Buddypress allows thumb size to be 50×50 (pixels) and full size to be 150px X 150 px.
If you want to fetch an avatar size greater than 150px, The avatar will look distorted in normla cases. There is a olution though. The easy solution is to change the default avatar size in BuddyPress.
To change the BuddyPress avatar size , you can add the following code in your theme's functions.php or put it in the bp-custom.php file in your wp-content/plugins directory. I use the second way, as It saves a lot of work while updating.
This is what you need to put for BuddyPress to change the default avatar size to be cropped :-
if ( ! defined( 'BP_AVATAR_THUMB_WIDTH' ) )
define( 'BP_AVATAR_THUMB_WIDTH', 50 ); //change this with your desired thumb width
if ( ! defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
define( 'BP_AVATAR_THUMB_HEIGHT', 50 ); //change this with your desired thumb height
if ( ! defined( 'BP_AVATAR_FULL_WIDTH' ) )
define( 'BP_AVATAR_FULL_WIDTH', 260 ); //change this with your desired full size,weel I changed it to 260 :)
if ( ! defined( 'BP_AVATAR_FULL_HEIGHT' ) )
define( 'BP_AVATAR_FULL_HEIGHT', 260 ); //change this to default height for full avatar
That's all. Go and try uploading a new avatar and you will see that the avatar is being cropped as per the custom dimensions specified.
Also, We have a new post to help you change the actual uploadable file size for the BuddyPress User & Group Profile Photo(avatar).