Open nr1q opened 5 years ago
Which version of the plugin are you using?
Another user just made an issue with something similar in #95.
I've tested from 2.1.5 to 2.4.2 and even beta release, but is the same: other image formats are being emitted (minified/optimized) but SVG is a zero size image file.
As additional info, here is the SVG I'm testing with:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="position:absolute" visibility="hidden" width="100%" height="100%">
<defs>
<!-- Symbols goes here -->
</defs>
</svg>
Looks like some of the passed options are ignored or something weird is happening because:
svgo
object I get a zero-size svg file.svgo
is set to null and options are passed through plugins
array I get this
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="position:absolute" visibility="hidden" width="100%" height="100%"/>
BUT, by removing the visibility attribute:
svgo
object; version, width and height attributes are stripped
<svg xmlns="http://www.w3.org/2000/svg" style="position:absolute"/>
plugins
array I get
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="position:absolute" width="100%" height="100%"/>
...I need the svg to be visibility=hidden
though.
Thanks! and I hope everything goes ok about the hurricane, be safe.
I'm having a weird issue passing options to
imagemin-svgo
, if done via thesvgo
object, seems like they are ignored, and produces a zero size SVG file; but it works if I disable the plugin by setting the object to null and including it again throughplugins
attribute as follows: