Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Question

    #61558
    @stackstreetnew

    how do i change the size that the buddypress avatars save as?

    I see you have the following set in init.php, but not sure the preferred route to modify this?

    Thanks!!!

    if ( !defined( ‘BP_AVATAR_THUMB_WIDTH’ ) ) {
    define( ‘BP_AVATAR_THUMB_WIDTH’, 140 );
    }

    if ( !defined( ‘BP_AVATAR_THUMB_HEIGHT’ ) ) {
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 140 );
    }

    if ( !defined( ‘BP_AVATAR_FULL_WIDTH’ ) ) {
    define( ‘BP_AVATAR_FULL_WIDTH’, 280 );
    }

    if ( !defined( ‘BP_AVATAR_FULL_HEIGHT’ ) ) {
    define( ‘BP_AVATAR_FULL_HEIGHT’, 280 );
    }

    Answers

    #65011

    Alyssa
    Participant
    @alyssa-buddyboss

    Hi @stackstreetnew,

    You can put same code above in functions.php of your child theme. You can change sizes as per your need.

    /*
     * Change BuddyPress avatar widths
     */
    if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) {
    	define( 'BP_AVATAR_THUMB_WIDTH', 140 );
    }
    
    if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) {
    	define( 'BP_AVATAR_THUMB_HEIGHT', 140 );
    }
    
    if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) ) {
    	define( 'BP_AVATAR_FULL_WIDTH', 280 );
    }
    
    if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) ) {
    	define( 'BP_AVATAR_FULL_HEIGHT', 280 );
    }

    Hope this helps you.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
  • The question ‘avatar size’ is closed to new replies.