This page redirects to an external site: https://developer.wordpress.org/reference/hooks/upload_mimes/
Add or remove allowed mime types and file extensions.
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['svg'] = 'image/svg+xml';
$mimes['svgz'] = 'image/svg+xml';
$mimes['doc'] = 'application/msword';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );
upload_mimes is located in wp-includes/functions.php.