Skip to content

Instantly share code, notes, and snippets.

@sjaved87
Created January 31, 2017 06:12
Show Gist options
  • Save sjaved87/1c8a1524c96172651327d2f7dc929ccb to your computer and use it in GitHub Desktop.
Save sjaved87/1c8a1524c96172651327d2f7dc929ccb to your computer and use it in GitHub Desktop.
Allow SVG files in media library.
<?php
function sjaved_svg_mime_type($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'sjaved_svg_mime_type');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment