How to add an SVG to WordPress

You might see the error: "This file is not allowed for security reasons." 

Try using a plugin (link below) or try adding this hook to your child themes function.php

function add_svg_to_uploads($file_types){ $svg_filetypes = array(); $svg_filetypes['svg'] = 'image/svg+xml'; $file_types = array_merge($file_types, $svg_filetypes ); return $file_types; } add_filter('upload_mimes', 'add_svg_to_uploads');

https://wordpress.org/plugins/svg-support/ 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.