Last active
August 29, 2015 14:06
-
-
Save JackNUMBER/6ce25d0d43a5ff6fb8ce to your computer and use it in GitHub Desktop.
[Wordpress] SVG upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* add this to functions.php */ | |
// allow SVG uploads | |
function allow_svg_mime_types( $mimes ){ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'allow_svg_mime_types'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add this in a post with with the complete file url --> | |
<img class="svg" alt="alternative text" src="file_url.svg"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment