Skip to:

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

  • WalkerDesign1


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

    I am experiencing this error within BuddyPress. It is only when I attempt to upload a profile image for the member in the Change Profile Photo option.

    I have a php.ini file in the main directory that has the following settings –

    memory_limit = 256M;
max_execution_time = 180;
upload_max_filesize = 20M;
post_max_size = 20M;
max_input_vars = 3000;
    I have also set the wp-config file with this setting –
    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

    Updating these files by increasing memory has not solved the BuddyPress Upload Failed! issue.

    Is there a configuration file in BuddyPress that needs to be updated or changed? Or am I missing a configuration file in the main directory I should be modifying?

    Uploading images within WordPress’s media directory works great.

    Buddypress is the only place where I am experiencing the upload fail error

Viewing 8 replies - 1 through 8 (of 8 total)
  • So the same image can be uploaded OK to the media library, but not BuddyPress? Very odd. How big is this image? (in resolution, and file size)



    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?

    I assume you’ve tried other images — i.e. it’s not a problem with the one image you have been testing with?

    I’m not sure, this is pretty odd.

    Any ideas?


    if the message “That photo is too big” appeared on avatar upload and not on cover image upload for the same image, i guess it’s possible a plugin/script/function or something i can’t have an idea of at the moment is either:
    – using define( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', x );
    – using `add_filter( ‘bp_core_avatar_original_max_filesize’, function( $size ) {
    return x;
    } );`
    – using `add_filter( ‘bp_attachments_get_max_upload_file_size’, function( $size, $type ) {
    if ( ‘avatar’ === $type ) {
    $size = x;
    return $size;
    } );`

    where x is an int for the max filesize.



    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.



    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.



    I am having this same issue too.



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

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar