add_filter( 'wp_all_import_image_mime_type', function( $mime_type, $image_filepath ){
if( empty( $mime_type ) && substr( $image_filepath, -4 ) == '.svg' ){
return 'image/svg+xml';
}
return $mime_type;
}, 10, 2 );
Can we add this small snippet into this plugin to enable SVG by default also for WP All Import plugin?
]]>Hello there,
I am building my site on localhost. I wanted to upload my logo as SVG. I have installed and activated this plugin but on uploading the svg, i get the error message ‘the file is not allowed for security reasons’. What could be the problem.
kind regards.
]]>Hey, when a member is loged in they cant see the svg.
without an account they see the svg image.
i dont know how to enable the view for registered members :/
Best Regards
This plugin can not recognize the viewbox value from the SVG like the below.
SVGs are turned into width:100/height:100.
Safe SVG plugin can handle it properly.<svg width="100%" height="100%" viewBox="0 0 1024 1024"
There is a notification area at the top of the media library page. “Settings page” and “Go to Settings” button links are root based. If the site is in a sub directory, the links are broken.
]]>I gave Admin unrestricted SVG upload capability, and could not upload images when working with other plugins.
What was happening: Using WP SVG Images with Stripe Payments plugin. I was trying to add a thumbnail to a new product but the SVG image would not upload.
Since then: I installed another SVG plugin. I went back to recreate the problem and, even after deleting the other SVG plugin, I was able to upload the SVG thumbnail into a product using SVG Payments plugin. Go figure.
I will try to recreate the site from backup to see if I can recreate it.
The issue was first mentioned in a review, moving it to support to try and figure it out (sorry for the delay, had to get the site up and running)
]]>This plugin doesn’t seem to filter the image dimensions of SVGs correctly or completely.
A division-by-zero bug is still happening even with this plugin enabled,
see https://github.com/WordPress/gutenberg/issues/36603.
At least return a non-zero fallback for SVGs for which the dimension can’t be determined,
to prevent these unexpected division-by-zero errors.
I have this one customer that will not see the light and wants to stick with GoDaddy. Anybody have this plugin working on GoDaddy?
]]>Hi,
I’ve noticed that the wp_get_attachment_image_srcset() function returns null when uploaded file has .svg extension. I know that your plugin only allows to upload SVG to WP library and shows thumbnail but maybe you have any idea about it? ??
On my website user can upload a separate file for desktop view and a separate file for mobile view. Any format is allowed (jpg/png/svg). My code:
<?php
$image_desktop_id = get_field('image_desktop_id');
$image_mobile_id = get_field('image_mobile_id');
$image_default_src = wp_get_attachment_image_src($image_desktop_id, 'full');
?>
<picture>
<source media="(max-width: 750px)" srcset="<?php echo wp_get_attachment_image_srcset($image_mobile_id); ?>">
<source media="(min-width: 751px)" srcset="<?php echo wp_get_attachment_image_srcset($image_desktop_id); ?>">
<img src="<?php echo $image_default_src[0]; ?>" srcset="<?php echo wp_get_attachment_image_srcset($image_desktop_id); ?>">
</picture>
]]>
Hi There,
I’ve used you plugin but don’t know how to change the size of the svg logo.
I am using udesign theme and the logo is in the theme setting. Would that be affecting it?
How do I let the svg load in the images in the same directory?
]]>Can this plugin compress SVG files to SVGZ to save space on my server?
]]>You forgot about this plugin. It is quite useful, but it is no longer compatible with WordPress 5.3
]]>So I installed and really enjoyed this plugin so far. I use it to set SVG thumbnails for posts.
I recently tried to import all my posts to another instance of WP. Everything imported except for the SVG thumbnails.
This can be pretty bad if you have a thousand posts and you will have to manually import each thumbnail image ??.
]]>
WP version: 5.2.2
Installed this plugin so that SVGs can be previewed from the media library view. They still show up as generic placeholders. Is it a bug with the plugin?
]]>I have enabled this plugin in one the the wpms subsites and it didn`t work. Is that really the case or is it a bug or did I do something wrong? Tks! ??
]]>Warning: count(): Parameter must be an array or an object that implements Countable in /…/plugins/wp-svg-images/wp-svg-images.php on line 44
I think that when you replace the line with
$ob_levels = ob_get_level();
the problem should be solved.