// into functions.php <?php function sp_enable_svg_upload( $mimes ) { //For security reasons only admin can uplaod svg files if ( !current_user_can( 'administrator' ) ) { return $mimes; } $mimes['svg'] = 'image/svg+xml'; $mimes['svgz'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'sp_enable_svg_upload'); ?>
Or use Daryll Doyle Safe SVG plugin.