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]

Duan Lingxin

Duan Lingxin

Content crafter and chief editor at Scratching Info. Also regular contributor on other major online tech platforms. Security Specialist by day and a writer by night, he does his best to instill his knowledge about tech while delivering inspiring and life changing resources through his writing,

More Posts - Website

Leave a Comment