Skip to content

Instantly share code, notes, and snippets.

@strsar
Last active February 8, 2022 10:26
Show Gist options
  • Save strsar/c569dccb7bc33f10806fc19370bde7cf to your computer and use it in GitHub Desktop.
Save strsar/c569dccb7bc33f10806fc19370bde7cf to your computer and use it in GitHub Desktop.
[WP] Wordpress - Add svg mime type to WP file upload
<?php
function add_svg_mime($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'add_svg_mime');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment