Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Max File Size Upload for Cover Photo


  • rfree190
    Participant

    @rfree190

    When users attempt to upload a cover photo, they are greeted with an error;
    “BBM_7134.jpg exceeds the maximum upload size of 5MB for this site.”
    I can’t find a way to increase this value anywhere.

    My WordPress upload max is set to 512MB.

    I’d be ok with a functions.php edit, or a wp-config.php edit.

    I’d like to increase it to around 10MB.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    Use this filter hook and write a function:
    apply_filters( 'bp_attachments_get_max_upload_file_size', $fileupload_maxk, $type );
    From this file: buddypress\bp-core\classes\class-bp-attachment-cover-image.php


    rfree190
    Participant

    @rfree190

    I used this for both the Avatar and the Cover Image;

    add_filter( 'bp_core_avatar_original_max_filesize', function() {
        return 26214400; // 25mb
    } );
    add_filter( 'bp_attachments_get_max_upload_file_size', function() {
        return 26214400; // 25mb
    } );

    Do you see any issues doing it like this?
    It works, but wondering if it’s going to mess anything else up along the way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar