Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/piotrpress/wordpress-upload-mimes/archive/refs/heads/master.zipOn Packagist as piotrpress/upload-mimes:
composer require piotrpress/upload-mimesNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
This plugin allows you to define MIME types for file uploads in WordPress via the UPLOAD_MIMES constant.
Usage via PHP constant in wp-config.php file
define( 'UPLOAD_MIMES', [
'jpg|jpeg|jpe' => 'image/jpeg',
'png' => 'image/png',
'gif' => 'image/gif',
'ico' => 'image/x-icon',
'pdf' => 'application/pdf',
'zip' => 'application/zip',
] );
Requirements
PHP >= 7.4 version.