Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Avatar Sizes/ Presets for Avatar Cropping

  • @zeitweise

    Participant

    I would like to change the sizes of the avatars so they will not be squared but oblonged. Does anyone know where to change the presets for avatar cropping?

    Is it even possible with the current cropping mechanism?

Viewing 6 replies - 1 through 6 (of 6 total)
  • @mariusooms

    Participant

    Take a look at the first few lines of file bp-core-avatars.php in the plugins/buddypress/bp-core directory.

    /* Define settings for avatars. [TODO] This will eventually end up as admin configurable settings */
    define( 'CORE_AVATAR_V1_W', apply_filters( 'bp_core_avatar_v1_w', 50 ) );
    define( 'CORE_AVATAR_V1_H', apply_filters( 'bp_core_avatar_v1_h', 50 ) );
    define( 'CORE_AVATAR_V2_W', apply_filters( 'bp_core_avatar_v2_w', 150 ) );
    define( 'CORE_AVATAR_V2_H', apply_filters( 'bp_core_avatar_v2_h', 150 ) );

    Currently they are not admin configurable yet, so keep not of the changes you make.

    @johnjamesjacoby

    Keymaster

    Changing these settings will also not go back and change any existing avatars, so it’s best to set this one time and forget about it (until you update later.)

    I recommend copy and pasting those define’s into a bp-custom.php file so that way BuddyPress upgrades won’t reset those values for you.

    @zeitweise

    Participant

    Thank you!

    @samantha-miller

    Participant

    Thanks for pointing me in the right direction @mariusooms and @johnjamesjacoby. As this is an old topic but came up first on Google, I thought I’d update with the current syntax:

    `define( ‘BP_AVATAR_THUMB_WIDTH’, 50 );
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
    define( ‘BP_AVATAR_FULL_WIDTH’, 150 );
    define( ‘BP_AVATAR_FULL_HEIGHT’, 150 );`

    This is using BP version 1.6.4.

    Cheers!

    @splendidangst

    Participant

    You’re awesome for the update @samantha-miller

    @samantha-miller

    Participant

    @splendidangst No problem 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change Avatar Sizes/ Presets for Avatar Cropping’ is closed to new replies.
Skip to toolbar