How to Change WordPress BuddyPress Avatar Sizes

A very powerful community plugin for WordPress “BuddyPress” allows several ways to customize the appearance and size of user avatars. In this article, we’ll show you how to change BuddyPress Avatar Sizes.

 

Default Avatar Sizes in BuddyPress

Before doing anything, you must know default values for customizing the avatar size. BuddyPress comes with two default sizes for avatar: Full (150 x 150) and Thumb (50 x 50). But you can change these values according to your design’s requirement.

Go to your plugins’ folder, where you’ll find bp-custom.php. If you don’t have, create one and paste the following code:

[code type=”php”]
define ( ‘BP_AVATAR_THUMB_WIDTH’, 50 );
define ( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
define ( ‘BP_AVATAR_FULL_WIDTH’, 150 );
define ( ‘BP_AVATAR_FULL_HEIGHT’, 150 );
define ( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’, 640 );
define ( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 200 );
[/code]

Change the values according per requirement. See below:

[code type=”php”]
define ( ‘BP_AVATAR_FULL_WIDTH’, 200 );
define ( ‘BP_AVATAR_FULL_HEIGHT’, 200 );
define ( ‘BP_AVATAR_THUMB_WIDTH’, 180 );
define ( ‘BP_AVATAR_THUMB_HEIGHT’, 180 );
define ( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’, 800 );
define ( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 200 );
[/code]

Leave a Comment