Support » Plugin: WP User Avatars » WebP Support

  • Hi there!

    Thanks for the great plugin!

    Since 5.8, WP has WebP support, but WP User Avatarss uploader doesn’t seem to support it. When attempting to upload a WebP image from the User Profile edit page, there is an error: “Avatar upload failed”. Adding a WebP image from the Media Library does work, however.

    I assume this because WebP isn’t set as one of the accepted image formats:

    // Handle upload
    $avatar = wp_handle_upload( $_FILES['wp-user-avatars'], array(
        'mimes' => array(
            'jpg|jpeg|jpe' => 'image/jpeg',
            'gif'          => 'image/gif',
            'png'          => 'image/png',
        'test_form' => false,
        'unique_filename_callback' => 'wp_user_avatars_unique_filename_callback'
    ) );

    Would it be possible to allow WebP images in the upload?


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.