HowTo – What file types are supported by WordPress Media Manager?

Filed under: Wordpress Tips

WordPress comes with the ability to manage a variety of different file types.

If the type of file that you want to upload is not listed in the default file type list then you have the option of editing WordPress to extend the features and allow your specific type or you can FTP the file to your site and manage it manually outside of WordPress.

Default File Types Supported by WordPress

Images

  • .jpg
  • .jpeg
  • .png
  • .gif

Documents

  • .pdf (Portable Document Format; Adobe Acrobat)
  • .doc, .docx (Microsoft Word Document)
  • .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation)
  • .odt (OpenDocument Text Document)
  • .xls, .xlsx (Microsoft Excel Document)

Audio

  • .mp3
  • .m4a
  • .ogg
  • .wav

Video

  • .mp4, .m4v (MPEG-4)
  • .mov (QuickTime)
  • .wmv (Windows Media Video)
  • .avi
  • .mpg
  • .ogv (Ogg)
  • .3gp (3GPP)
  • .3g2 (3GPP2)

How To extend WordPress Default File Types

You can extend your file types in WordPress by adding a few lines of code to your functions.php file.

If you you are using a default or upgradeable theme you may want to make a child theme so your functions.php file will not get overwritten when you upgrade your theme.. if it does you will lose your settings.

 

// Added to extend allowed files types in Media upload
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {

// Add *.EPS files to Media upload
$existing_mimes['eps'] = 'application/postscript';

// Add *.AI files to Media upload
$existing_mimes['ai'] = 'application/postscript';

return $existing_mimes;
}