Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: Allow SVG uploads
<?php
/* Allow upload of SVG files */
/* Source: https://blog.kulturbanause.de/2013/05/svg-dateien-in-die-wordpress-mediathek-hochladen/ */
function voneff_svg ( $svg_mime ){
$svg_mime['svg'] = 'image/svg+xml';
return $svg_mime;
}
add_filter( 'upload_mimes', 'voneff_svg' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment