BuddyBoss Home – Web Support Forums Themes BuddyBoss theme Change cover image size

Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    #54562
    @karlos

    Hello,

    I changed the cover image size. It is looking good, but the image looks blurry.
    It is like it is displaying good but it is still uploading the default size, so it stretches and therefore looks blurry.

    I used this 2 hooks found here: https://codex.buddypress.org/themes/buddypress-cover-images/
    add_filter( ‘bp_before_xprofile_cover_image_settings_parse_args’, ‘your_theme_xprofile_cover_image’, 10, 1 );
    add_filter( ‘bp_before_groups_cover_image_settings_parse_args’, ‘your_theme_xprofile_cover_image’, 10, 1 );
    function your_theme_xprofile_cover_image( $settings = array() ) {

    $settings[‘width’] = 1040;
    $settings[‘height’] = 320;

    return $settings;
    }

    Please help!

    Thank you

    Answers

    #54569
    @vapvarun

    Hi @karlos
    You will need to adjust the custom css along with it

    It will give you can idea
    https://gist.github.com/imath/e5abe98b88166add38d2
    It contain all css classes which are required for cover image
    Regards

    #54579
    @karlos

    Hello,

    The css is adjusted directly in the buddyboss-child/css/custom.css. Does that work?

    Please look this profile:
    http://laucampeon.com/members/karlos/

    The problem is, apparently upon uploading a new cover image the system is still cropping it at default size 1040×180, so when it’s displayed at the new size 1040×320, it looks blurry and stretched.

    Any idea why?

    #54607
    @vapvarun

    try these functions

    
    function bb_cover_image_settings( $settings = array() ) {
        $settings['callback'] = 'buddyboss_cover_image_callback';
        $settings['theme_handle'] = 'buddyboss-bp-frontend';
        $settings['width'] = 1040;
        $settings['height'] = 320;
    
        return $settings;
    }
    remove_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'buddyboss_cover_image_settings', 10, 1 );
    remove_filter( 'bp_before_groups_cover_image_settings_parse_args', 'buddyboss_cover_image_settings', 10, 1 );
    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'bb_cover_image_settings', 10, 1 );
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'bb_cover_image_settings', 10, 1 );
    

    Regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘Change cover image size’ is closed to new replies.