Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar Upload ‘Wrong Size’ Message Is Wrong


  • cybercreative
    Participant

    @cybercreative

    I have a problem that puts members off completing avatar picture uploads. No matter what size an image is uploaded, even when much larger than 580×580 the same message appears (at the same time member should crop avatar) “You have selected an image that is smaller than recommended. For best results, upload a picture larger than 580 x 580 pixels.” How do I remove this annoying and false message? I am completely lost on a solution, any advise would be greatly appreciated!

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

  • dsnic
    Participant

    @dsnic

    Hi @cybercreative did you find a solution to this? I’m facing the same problem. The error message keeps appearing no matter how big the picture I upload is.

    Hi,

    By default the avatar sizes are :
    – 150x150px for Full size
    – 50x50px for thumb size

    If a message is asking for a different minimum size, then it’s meaning a plugin or a theme is using some of our filters/constants to edit these sizes.

    You can search for this filter bp_core_avatar_full_width or this constant BP_AVATAR_FULL_WIDTH outside of BuddyPress to find who’s setting the size to be 580x580px.


    dsnic
    Participant

    @dsnic

    Hi @imath thanks for jumping in. I spoke with the theme developers and they said that the theme sets the “BP_AVATAR_FULL_WIDTH” to 580 px. But even so, the Buddypress message is still wrong, because I’m uploading a bigger image and the message tells me that it’s a smaller image.


    Nasse
    Participant

    @nasse

    Has someone found a solution for this problem? I’m facing the exact same problem. When changing the avatar message displaying: “You have selected an image that is smaller than recommended. For best results, upload a picture larger than 580 x 580 pixels”…and no upload happens eventhough image is larger then 580 x 580 pixels…


    danbp
    Participant

    @danbp

    Hi @nasse,

    please take a look in following file: bp-core/bp-core-avatars.php

    You can read all comments inside that file to understand how avatars are working.
    At line 919, you’ll find this comment:
    // If the uploaded image is smaller than the “full” dimensions, throw a warning. which is the one you related to.

    Then read again @imath ‘s above answer.


    dsnic
    Participant

    @dsnic

    Hi all,

    As @danbp suggested, I’ve looked at the file: bp-core/bp-core-avatars.php
    The full avatar size is indeed set to 150×150 by default there, as @imath has said.

    If the others in this thread facing the same problem are using the Kleo or Sweet Date theme, then you’ll find the default 580×580 avatar size set in this file: wp-content/plugins/bp-custom.php

    The problem, however, is that even when the image being uploaded is a lot bigger than 580×580, the error notification still appears.

    For now, I’ve temporarily “solved” the problem by commenting out the code mentioned by @danbp so the error notification doesn’t appear. This kinda works because the site will still accept the uploaded photo despite the error notification. At least this way there’s no error notification to confuse users.

    However, this is probably not the correct way to solve this issue. Can someone please help with a more elegant solution?


    mongol7
    Participant

    @mongol7

    Hello dsnic. Sorry to bother you but it’s important. You and I had the same problem with a “Buddypress who clicked at my profile” plugin. You said to see a page with “fatal error” errors. Have you found a solution since? I asked for help but I do not have an answer and unfortunately I miss the time.

    cordially

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