• Resolved valeron4iwe

    (@valeron4iwe)


    Hi.
    I have installed safe svg plugin and all vector grafics work correctly, but if I use import it cant recognize an .svg file. However it shows me preview of image.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @valeron4iwe,

    Please try saving this snippet in your child theme’s functions.php file, or in a Code Snippets plugin:

    add_filter('wp_all_import_image_mime_type', 'wpai_image_mime_type', 10, 2);
    
    function wpai_image_mime_type($mime_type, $image_filepath) {
      if (empty($mime_type) and preg_match('%\W(svg)$%i', basename($image_filepath))) {
        return 'image/svg+xml';
      }
      return $mime_type;
    }

    That will allow WP All Import to import SVG images.

    Plugin Author WP All Import

    (@wpallimport)

    Hi @valeron4iwe,

    I’m marking this thread as resolved since it’s been inactive for a while. Please open a new topic if you still have questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Svg import.’ is closed to new replies.