Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2022 12:16:46 PM (21 months ago)
Author:
imath
Message:

Media: add support for the .webp image file type

NB: this support will only be available when the community site uses WP >= 5.8.

Props dcavins

Fixes #8643

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r13175 r13315  
    494494        }
    495495
    496         /**
    497          * WordPress image supported types.
    498          * @see wp_attachment_is()
    499          */
    500         $supported_image_types = array(
    501             'jpg'  => 1,
    502             'jpeg' => 1,
    503             'jpe'  => 1,
    504             'gif'  => 1,
    505             'png'  => 1,
    506         );
     496        // Set supported image types.
     497        $supported_image_types = array_fill_keys( bp_attachments_get_allowed_types( 'image' ), 1 );
    507498
    508499        foreach ( $check_types as $file ) {
Note: See TracChangeset for help on using the changeset viewer.