Hi Brajesh, this is a question which has been asked, and answered before, but I’m still not able to get an acceptable solution to the cropping of the cover image.
Why is the cover image cropped at all, compared to the original, and how do I solve it?
Original:
https://imgur.com/SlGD0TuDesktop:
https://imgur.com/e1M6XU7On mobile the cover image is useless:
I found this code, here: https://buddydev.com/support/forums/topic/cover-image-cropping-function/
function buddydev_enable_crop_for_cover_image( $args ) { $args['crop'] = true; return $args; } add_filter( 'bp_after_attachment_cover_image_edit_image_parse_args', 'buddydev_enable_crop_for_cover_image' );
But it does nothing to my cover image.
Regards
CarstenHi Carsten,
Thank you for the question.1. You can set the height/width via a filter
2. The above code only applies on new uploads3. Until there is multiple cover size available, the best way to achieve good results will be to use css background properties to achieve the result. I will suggest looking into background-size and background-position for the same.
Regards
BrajeshThank you and I do hope so. Having multiple image size will be a boon.
The topic ‘ [Resolved] Cropping of cover image’ is closed to new replies.