BuddyDev

Search

Default avatar not affected by code, for changing avatar size

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #25458

    Hi there, I am using this code snippet from your archive, to change the avatar size, and it works well for new uploaded images.

    The problem is, that it does not change the size of the default avatar, if users do not upload an avatar, or when users delete their avatars again. Then the avatar is default square size again.

    Regards
    Carsten

    if ( ! defined( 'BP_AVATAR_THUMB_WIDTH' ) )
        define( 'BP_AVATAR_THUMB_WIDTH', 100 ); //change this with your desired thumb width
     
    if ( ! defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
        define( 'BP_AVATAR_THUMB_HEIGHT', 133); //change this with your desired thumb height
     
    if ( ! defined( 'BP_AVATAR_FULL_WIDTH' ) )
        define( 'BP_AVATAR_FULL_WIDTH', 200 ); //change this with your desired full size, well I changed it to 260 :)
     
    if ( ! defined( 'BP_AVATAR_FULL_HEIGHT' ) )
        define( 'BP_AVATAR_FULL_HEIGHT', 266 ); //change this to default height for full avatar
    
  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #25460

    Hi Carsten,
    Thank you for the question.

    The WordPress default avatar comes from gravatar.com. The gravatar does not support non square iamge. That’s why you are seeing it.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved