How To Allow Svg Upload In Wordpress. If you dont want to animate your SVGs then you can skip this option. Function cc_mime_types mimes mimes svg imagesvgxml.
Please review the video. Add_filter upload_mimes upload_svg_files. Locate your themes functionsphp whitin the Theme Editor and paste the following code snippet at its end.
Safe SVG is designed to allow you to upload SVGs to WordPress while sanitizing them to avoid any security vulnerabilities.
You just need to make sure you save it from illustrator or your vector software then open with a text editor like sublime text and you will see it. While you may have safeguards in place to protect WordPress its still a threat you need to consider when allowing SVG uploads to WordPress. Add_filter upload_mimes add_svg_to_upload_mimes 10 1. Locate your themes functionsphp whitin the Theme Editor and paste the following code snippet at its end.