Cannot upload SVG files
-
We’re using SVG:s as icons but the plugin does not uploads them.
Problem:
– SVG has mime type image/svg+xml
– Plugin trigger uploads with images with filter wp_update_attachment_metadata
– $metadata in wp_update_attachment_metadata is empty
– action_add_attachment trigger upload on all non-image files but wp_attachment_is_image turns trueMy quick fix in dos_class.php:199
if ( wp_attachment_is_image($postID) == false || get_post_mime_type($postID) == ‘image/svg+xml’) {get_post_mime_type($postID) == ‘image/svg+xml’ will upload the SVG.
Maybe we need better support for this? Btw thanks for an awesome plugin!
- The topic ‘Cannot upload SVG files’ is closed to new replies.