WordPress
0
Вклад в тег
You can solve this by inserting the following snippet in the Function Editor (All Import -> Settings):
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;
}
Let us know how that goes, or if you have any other questions.
Best Regards,
Diego Mariño
Soflyy
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;
}