Skip to content

Instantly share code, notes, and snippets.

@jayseventwo
Created October 13, 2013 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayseventwo/6968468 to your computer and use it in GitHub Desktop.
Save jayseventwo/6968468 to your computer and use it in GitHub Desktop.
Enable .svg format uploads in wordPress. Add to functions.php
// enable svg format file upload
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
// add the file extension to the array
$existing_mimes['svg'] = 'mime/type';
// call the modified list of extensions
return $existing_mimes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment