Upload additional file types without a plugin
Posted: Mon Jan 27, 2025 10:15 am
Method 2:
If you don't want to install a plugin to load additional file types, simply add this code snippet to your functions.php file or to your site- specific plugin .
In the above code, you'll notice that the usa consumer email list file extension is the key of the associated $mime_types array, and the mime type is its value. In this example, the svg file extension represents files with the mime type image/svg+xml.
If you want to add multiple file types, you can do so using the following:
We hope this post helped you upload additional file types to your WordPress media library. You might also want to read about the best file upload plugins for WordPress.
We also have an easy tutorial on How to Create a File Upload Form in WordPress that you will find helpful.
If you don't want to install a plugin to load additional file types, simply add this code snippet to your functions.php file or to your site- specific plugin .
In the above code, you'll notice that the usa consumer email list file extension is the key of the associated $mime_types array, and the mime type is its value. In this example, the svg file extension represents files with the mime type image/svg+xml.
If you want to add multiple file types, you can do so using the following:
We hope this post helped you upload additional file types to your WordPress media library. You might also want to read about the best file upload plugins for WordPress.
We also have an easy tutorial on How to Create a File Upload Form in WordPress that you will find helpful.