Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


  • WalkerDesign1
    Participant

    @walkerdesign1

    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.

    Uploading the same image within WordPress’s media directory works great.

    The image size that I am trying to upload as a profile image within BuddyPress 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?

    The /bp-core/bp-core-avatars.php file has this 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 1 replies (of 1 total)

  • 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.

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