Skip to:

Requiring minimum dimensions for Avatars

  • Is there a way in bp-core-avatars to require users to upload avatars of 150×150 pixels or bigger? Right now if they upload an image smaller than that Buddypress puts a big ugly black border around the image.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Nope, no way of specifying minimum size. (Maximum, yes). You probably ought to submit this on the WPMU trac as a enhancement suggestion, or see if you can find a WPMU plugin that somehow achieves this.

    But the avatar uploads functions are not in WPMU, they are all in buddypress core. There’s no way to just alter the bp_core_check_avatar_size() function in bp-core-avatars to check for minimum 150×150? Can’t it just use the getimagesize() function since it actually returns width and height? I noticed it’s actually already being used in several functions.

    Oh, I was looking at the get_avatar() and wp_crop_image() which do handle avatars, but you are right that the crop feature is a BP enhancement. Regardless, there’s still no built-in minimum size feature in BP so that needs submitting as an enhancement suggestion – but I’m not sure if that upgrade would go better in the WPMU or the BP codebase.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Requiring minimum dimensions for Avatars’ is closed to new replies.
Skip to toolbar