How to increase the upload size limit for cover images on BuddyPress

avatar
Share This:

The steps to increase the upload limit are as follows.

You can increase the upload size limit by editing the functions.php file. For example, to increase it to 10MB, add the following code to your functions.php file:

function bbp_cover_image_file_size( $fileupload_maxk, $type ) {
    if ( 'avatar' == $type ) {
        $fileupload_maxk = 10485760; // 10MB in bytes
    }
    if ( 'cover_image' == $type ) {
        $fileupload_maxk = 10485760; // 10MB in bytes
    }
    return $fileupload_maxk;
}
add_filter( 'bp_attachments_get_max_upload_file_size', 'bbp_cover_image_file_size', 10, 2 );

This code increases the upload limit for both avatars and cover images to 10MB. It also works by pasting it in the WpCode Lite plugin and saving it.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

15 − seven =