Forums
Forums / Plugin: Drag and Drop Multiple File Upload for Contact Form 7 / SVG error
(@simongabaxial)
2 years ago
When uploading multiple files (png, jpeg, pdf, ect) everything works perfectly except for svg files.
When trying to upload a SVG I get the error message : UPLOADED FILE IS NOT ALLOWED FOR FILE TYPEAm I missing something in the settings to allow svg files?
(@glenwpcoder)
Hello @simongabaxial ,
Currently WordPress doesn’t allow svg files for security reasons.
However you can add the following code in your theme/child theme functions.php file.
function custom_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes;}add_filter('upload_mimes', 'custom_mime_types');
You will need to be careful on this as some svg file contains malicious code.
Or you can use this plugin – https://ww.wp.xz.cn/plugins/safe-svg/
Thanks.
The topic ‘SVG error’ is closed to new replies.