In uploading files or setting rules for your WordPress site, you may wonder what file types are supported by WordPress, and what MIME types are supported. In this article we explain what MIME types are, which MIME types WordPress allows to be uploaded, which MIME types WordPress recognizes, and how to add more MIME types if needed.
What are MIME types?
MIME stands for Multipurpose Internet Mail Extensions. MIME types are used by browsers and other internet devices to determine the type of content associated with a page. For instance, if you have a .png file and a .jpeg file on the page, the browser would know by their MIME types to treat both files as images rather than videos or other file types.
By default, WordPress has a list of registered mime types stored in wp-includes/functions.php that any developer can call using wp_get_allowed_mime_types(). These files are the file types recognized by WordPress. However, not all MIME types recognized are allowed to be uploaded in the WordPress Admin Dashboard. To see only the types that WordPress allows to be uploaded, you can use the upload_mimes filter.
What MIME types can I upload?
Just because WordPress identifies a specific MIME type does not necessarily mean that the file type can be uploaded in your WordPress Admin Dashboard. WordPress restricts the file types that can be uploaded to the ones listed below.
To start, we will look at a list of the various file types supported by WordPress, and the MIME types of those file extensions.
File extension | MIME type |
.jpg | image/jpeg, image/pjpeg |
.jpeg | image/jpeg, image/pjpeg |
.png | image/png |
.gif | image/gif |
.ico | image/x-icon |
application/pdf | |
.doc | application/msword |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.ppt | application/mspowerpoint, application/powerpoint, application/vnd.ms-powerpoint, application/x-mspowerpoint |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
.pps | application/mspowerpoint, application/vnd.ms-powerpoint |
.ppsx | application/vnd.openxmlformats-officedocument.presentationml.slideshow |
.odt | application/vnd.oasis.opendocument.text |
.xls | application/excel, application/vnd.ms-excel, application/x-excel, application/x-msexcel |
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
.psd | application/octet-stream |
.mp3 | audio/mpeg3, audio/x-mpeg-3, video/mpeg, video/x-mpeg |
.m4a | audio/m4a |
.ogg | audio/ogg, |
.wav | audio/wav, audio/x-wav |
.mp4 | video/mp4 |
.m4v | video/x-m4v |
.mov | video/quicktime |
.wmv | video/x-ms-asf, video/x-ms-wmv |
.avi | application/x-troff-msvideo, video/avi, video/msvideo, video/x-msvideo |
.mpg | audio/mpeg, video/mpeg |
.ogv | video/ogg |
.3gp | video/3gpp, audio/3gpp |
.3g2 | video/3gpp2, audio/3gpp2 |
What other MIME types does WordPress recognize?
Using the wp_get_allowed_mime_types() function you can get a list of MIME types WordPress recognizes. Below we’ll go over the MIME types not allowed to be uploaded, that WordPress still recognizes.
File extension | MIME type |
.bmp | image/bmp |
.tif | image/tiff |
.tiff | image/tiff |
.asf | video/x-ms-asf |
.asx | video/x-ms-asf |
.wm | video/x-ms-wm |
.wmx | video/x-ms-wmx |
.divx | video/divx |
.flv | video/x-flv |
.qt | video/quicktime |
.mpe | video/mpeg |
.webm | video/webm |
.mkv | video/x-matroska |
.txt | text/plain |
.asc | text/plain |
.c | text/plain |
.cc | text/plain |
.h | text/plain |
.csv | text/csv |
.tsv | text/tab-separated-values |
.ics | text/calendar |
.rtx | text/richtext |
.css | text/css |
.htm | text/html |
.html | text/html |
.m4b | audio/mpeg |
.ra | audio/x-realaudio |
.ram | audio/x-realaudio |
.mid | audio/midi |
.midi | audio/midi |
.wax | audio/x-ms-wax |
.mka | audio/x-matroska |
.rtf | application/rtf |
.js | application/javascript |
.swf | application/x-shockwave-flash |
.class | application/java |
.tar | application/x-tar |
.zip | application/zip |
.gz | application/x-zip |
.gzip | application/x-zip |
.rar | application/rar |
.7z | application/x-7z-compressed |
.exe | application/x-msdownload |
.pot | application/vnd.ms-powerpoint |
.wri | application/vnd.ms-write |
.xla | application/vnd.ms-excel |
.xlt | application/vnd.ms-excel |
.xlw | application/vnd.ms-excel |
.mdb | application/vnd.ms-access |
.mpp | application/vnd.ms-project |
.docm | application/vnd.ms-word.document.macroEnabled.12 |
.dotx | application/vnd.openxmlformats-officedocument.wordprocessingml.template |
.dotm | application/vnd.ms-word.template.macroEnabled.12 |
.xlsm | application/vnd.ms-excel.sheet.macroEnabled.12 |
.xlsb | application/vnd.ms-excel.sheet.binary.macroEnabled.12 |
.xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template |
.xltm | application/vnd.ms-excel.template.macroEnabled.12 |
.xlam | application/vnd.ms-excel.addin.macroEnabled.12 |
.pptm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
.ppsm | application/vnd.ms-powerpoint.slideshow.macroEnabled.12 |
.potx | application/vnd.openxmlformats-officedocument.presentationml.template |
.potm | application/vnd.ms-powerpoint.template.macroEnabled.12 |
.ppam | application/vnd.ms-powerpoint.addin.macroEnabled.12 |
.sldx | application/vnd.openxmlformats-officedocument.presentationml.slide |
.sldm | application/vnd.ms-powerpoint.slide.macroEnabled.12 |
.onetoc | application/onenote |
.onetoc2 | application/onenote |
.onetmp | application/onenote |
.onepkg | application/onenote |
.odp | application/vnd.oasis.opendocument.presentation |
.ods | application/vnd.oasis.opendocument.spreadsheet |
.odg | application/vnd.oasis.opendocument.graphics |
.odc | application/vnd.oasis.opendocument.chart |
.odb | application/vnd.oasis.opendocument.database |
.odf | application/vnd.oasis.opendocument.formula |
.wp | application/wordperfect |
.wpd | application/wordperfect |
.key | application/vnd.apple.keynote |
.numbers | application/vnd.apple.numbers |
.pages | application/vnd.apple.pages |
What if I need to use other file types?
If you need to use other file types with WordPress beyond what it identifies already, you can use a plugin to extend this function. Two commonly used plugins include WP Add Mime Types or WP Extra File Types, which will both enable WordPress to recognize other file types not on this list (common examples include .epub or .mobi files from eBooks). If you need a reference of which MIME types are available web-wide to add, see this comprehensive list.