Skip to:

Cropping Misaligned After Uploading Buddy Press 1.7

  • jeffp808


    I have an issue where after a user uploads a picture for their avatar, the alignment if extremely off when they go to crop it. So if they try to crop to the center, they are really cropping to the top left. Could anyone please help me with this? Thank you so much in advance!

    Screenshot Of Avatar Cropping Issue

    I’m running WordPress Version 3.5.1 and Buddypress 1.7.

Viewing 3 replies - 1 through 3 (of 3 total)

  • @mercime


    @jeffp808 looks like conflict with jcrop. Change to Twenty Twelve theme and check if cropping is corrected. If not, deactivate other plugins batch by batch except BuddyPress to check which is interfering with cropping.



    @mercime, I’ve been spending some time on it and think I figured it out, but now I have another minor issue.

    So incase anyone has this same issue, it was as simple as editing the /wp-content/plugins/buddypress/bp-core/bp-core-avatars.php file to match my profile images (which are 120px and 50px) :

    function bp_core_set_avatar_constants() {

    if ( !defined( ‘BP_AVATAR_THUMB_WIDTH’ ) )
    define( ‘BP_AVATAR_THUMB_WIDTH’, 50 );

    if ( !defined( ‘BP_AVATAR_THUMB_HEIGHT’ ) )
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );

    if ( !defined( ‘BP_AVATAR_FULL_WIDTH’ ) )
    define( ‘BP_AVATAR_FULL_WIDTH’, 120 );

    if ( !defined( ‘BP_AVATAR_FULL_HEIGHT’ ) )
    define( ‘BP_AVATAR_FULL_HEIGHT’, 120 );

    if ( !defined( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’ ) )
    define( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’, 120 );

    I found out the culprit was ” if ( !defined( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’ ) )
    define( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’, 120 ); – because before it had “,450” and if I uploaded a very large image then the size would be 450 but the box is only 120.



    Hope that helps someone! Now after that, I have another very minor issue. When a user goes to upload or change their avatar, and if they upload – without clicking on the crop tool – then the image is uploaded off-center. But if they move the crop tool at all and then upload it is fine.

    Any ideas how to align where buddypress crops the image from if they do not click the crop tool?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cropping Misaligned After Uploading Buddy Press 1.7’ is closed to new replies.
Skip to toolbar