Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • WalkerDesign1
    Participant

    @walkerdesign1

    Figured out the problem. The file name for the profile image was too long. It needed to be shortened. Upload and cropping is working great.


    WalkerDesign1
    Participant

    @walkerdesign1

    I revised bp-custom.php to have the following code –

    <?php
    // hacks and mods will go here
    define ( ‘BP_AVATAR_THUMB_WIDTH’, 60 );
    define ( ‘BP_AVATAR_THUMB_HEIGHT’, 60 );
    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’, 20000 );
    add_filter( ‘bp_do_register_theme_directory’, ‘__return_true’ );
    ?>

    By changing the line – define ( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 20000 ); to have the numeric value of 20000 it now allows me to upload an avatar image.

    But now it will now allow me to crop the image.

    Error message reads – There was a problem cropping your profile photo.


    WalkerDesign1
    Participant

    @walkerdesign1

    Does the bp-core-avatars.php file need to be modified?

    Right now the current bp-core-avatars.php file has the following code –

    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’, 150 );

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

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

    if ( !defined( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’ ) ) {
    define( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, bp_attachments_get_max_upload_file_size( ‘avatar’ ) );
    }

    if ( ! defined( ‘BP_SHOW_AVATARS’ ) ) {
    define( ‘BP_SHOW_AVATARS’, bp_get_option( ‘show_avatars’ ) );
    }

    Does there need to be something different in the following line of code?

    if ( !defined( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’ ) ) {
    define( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, bp_attachments_get_max_upload_file_size( ‘avatar’ ) );


    WalkerDesign1
    Participant

    @walkerdesign1

    Does anyone know where I should be implementing the code that @imath has shared with me regarding the error message I have received?

    Upload Failed! Error was: That photo is too big. Please upload one smaller than

    This error message only happens when their is an upload of the profile photo within BuddyPress. The same profile photo can be uploaded into the media library within WordPress successfully. Unfortunately BuddyPress does not look for the media library to upload the profile image. It looks for the users hard drive.

    Note: The upload of the profile image was working for the original install 2 months ago. I was able to upload 400 members profile images and then one day it stopped working. Not sure if there was an update that is causing the conflict.

    Help would be appreciated as this is delaying the launch of this website.


    WalkerDesign1
    Participant

    @walkerdesign1

    Hi @imath

    Thank you for the information. I have been looking into this and I am stuck.

    Not sure where I would be putting this code. Are you able to provide a little more information? For example which function file in which directory? Or do I create one? I have no idea.

    Your help is very appreciated.


    WalkerDesign1
    Participant

    @walkerdesign1

    Hi Paul,

    The profile image is 19kb, it’s resolution 72 pixels.

    BuddyPress does allow me to upload a cover image that is 169KB.

    BuddyPress does not seem to allow any kind of file size to be uploaded for the member’s profile image. It may have something to do with the Profile Image configuration. Is there a configuration that is specific for the profile image?

Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar