By default, WordPress only supports a standard list of file formats when it comes to media uploading. (You can get the latest list from WordPress here.)

If you wish to add support for a specific file type, you’ll first need to find out the MIME type of the file type you’re trying to add. (See full list of all MIME type here.).

For example, I’d like to add support for “svg” vector file. So the MIME type for svg is image/svg+xml.

Then in your functions.php add the following function and bind it to the “upload_mimes” filter:

function cc_mime_types($mimes) {
 $mimes['svg'] = 'image/svg+xml';
 return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');

Voila! You can now upload svg file in Media Library.