Frequently Asked Question

Allow additional filetypes to be uploaded to WP media library
Last Updated a year ago

WordPress has some odd restrictions on uploading valid image types to the media library.

One that seems to work well, and is being updated is: "File Upload Types by WPForms"


Or, to allow any file types to be uploaded to WP, put this in the wp-config.php file:



Optimally, filetypes should be added through the functions.php file in your theme:

  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' );

Please Wait!

Please wait... it will take a second!