CategoryFront-End Development

Enable SVG in WordPress Media Library using a function

E

The WordPress Media Library does not permit uploading SVG file types by default. Trying to upload an SVG file to the WordPress Media Library displays a warning reading, "Sorry, this file type is not permitted for security reasons." To change the functionality of your site and to permit SVG upload, you'll need to update your theme or child theme's function.php with this code.

Recent Posts

Archives

Categories