#8598 closed defect (bug) (fixed)
Incorrect warning message and blurry uploaded avatars when avatar upload size is customised
Reported by: | niftythree | Owned by: | imath |
---|---|---|---|
Milestone: | 10.0.0 | Priority: | normal |
Severity: | normal | Version: | 9.1.1 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Hello,
When customising avatars (as mentioned here - https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/), setting larger full width and height (such as 350x400px), the message "You have selected an image that is smaller than recommended. For best results, upload a picture larger than 350 x 400 pixels." appears. The image being uploaded is 2000x3000px, so the image is large enough. When proceeding to crop the image, the final image is of poor quality (blurry).
We're using BuddyPress version 9.1.1 and the Legacy template pack. We've tested this with no other plugins and using a default WordPress theme (we've tested using Twenty Twenty-One, Twenty Twenty and Twenty Nineteen).
We're aware of this previous post (https://buddypress.org/support/topic/avatar-upload-wrong-size-message-is-wrong/) but given we've tested using default themes, we don't believe that the theme or any plugins are interfering.
Thanks.
Attachments (2)
Change History (7)
#2
@
3 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 10.0.0
I confirm I was able to replicate. It's probably due to the fact you're not using a square. I'll see what I can do.
#3
@
3 years ago
- Keywords has-patch added; needs-patch removed
@niftythree I believe you should increase the value of the BP_AVATAR_ORIGINAL_MAX_WIDTH
for the dimensions you selected. It's an aspect ratio issue. The attached patch is improving the feedback message for such cases.
#5
@
3 years ago
Hi @imath
Thank you very much for looking into this.
On desktop and larger mobile devices (such as tablets), the issue of the message/blurry photo cropping is resolved with your suggestion. However, it would seem that the larger the BP_AVATAR_FULL_WIDTH
and BP_AVATAR_FULL_HEIGHT
are set to, the larger your portrait screen size (width) has to be for the message/blurry photo cropping to not occur on smartphones. It seems to be OK when switching to landscape orientation.
For example, when using the following setup and a default theme, the message and blurry photo cropping triggers on a smartphone in portrait mode, but not in landscape mode:
define( 'BP_AVATAR_THUMB_WIDTH', 280 ); define( 'BP_AVATAR_THUMB_HEIGHT', 320 ); define( 'BP_AVATAR_FULL_WIDTH', 350 ); define( 'BP_AVATAR_FULL_HEIGHT', 400 ); define( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 999 );
Thanks.
Thanks for your report. I'll have a look at it soon.