#8643 closed enhancement (fixed)
Support .webp images for profile photos or cover images
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 11.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | needs-patch |
Cc: |
Description
This bad review contains a suggestion about supporting webp images. I believe we should include the support of it for profile photos and cover images.
Attachments (3)
Change History (13)
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
3 years ago
#3
@
2 years ago
- Keywords has-patch added; needs-refresh removed
The above patch is adding some bp_is_running_wp( '5.8.0', '>=' )
to make sure BuddyPress profile image / cover image can use .webp
images.
#4
@
2 years ago
This works well. I tried it with WP 5.7 and the current 6-alpha, and the behavior was as expected in both cases. I was sort of surprised when WP was able to edit a WebP. :)
I do sort of wish that instead of listing out the allowed types in bp_attachments_get_allowed_types()
, we could fetch them from BP_Attachment->get_supported_image_types()
so that they'd only be managed in one location.
Thanks for this update!
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
2 years ago
#6
@
2 years ago
- Keywords commit added
Thanks for you feedback @dcavins It helped me found some issues I've missed on the 2 first patches. Due to "historical filters" about the avatar object, it's easier to manage allowed file types from bp_attachments_get_allowed_types()
, that's why I've removed BP_Attachment->get_supported_image_types()
instead of your suggestion.
#8
@
2 years ago
- Keywords needs-patch added; has-patch commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Ouch! I forgot to take in account the fact this support is only available in WP >= 5.8 in unit tests, that's why our it failed here: https://github.com/buddypress/buddypress/runs/7819196650
NB: WordPress supports WebP since version 5.8, the patch needs to be updated to include a WP version check.