Let’s make some defined heights and widths for the Buddypress cover image. The code snippets work for the member and group cover images.
Enhancing a custom size, from the otherwise default cover size, could boost a better design for your Buddypress site.
bp-custom.php
// member cover image default size
function define_size_xprofile_cover_image($settings = array())
{
$settings['width'] = 1200; // set to px
$settings['height'] = 375; // set to px
return $settings;
}
add_filter('bp_before_xprofile_cover_image_settings_parse_args', 'define_size_xprofile_cover_image', 10, 1);
// group cover image default size
function define_size_group_cover_image($settings = array())
{
$settings['width'] = 1200; // set to px
$settings['height'] = 375; // set to px
return $settings;
}
add_filter('bp_before_groups_cover_image_settings_parse_args', 'define_size_group_cover_image', 10, 1);