svg / svgo

⚙️ Node.js tool for optimizing SVG files
https://svgo.dev/
MIT License
21.01k stars 1.39k forks source link

root SVG ID gets removed #643

Closed koraysels closed 3 years ago

koraysels commented 7 years ago

how can i prevent the SVG id attribute from being removed ?? (i am usin imagemin with svgo plugin..)

the following options do not work:

 svgoPlugins: [{removeViewBox: false, SVGid: true}],
 svgoPlugins: [{removeViewBox: false, cleanUpIDs : false}],
GreLI commented 7 years ago

With CLI --disable=cleanupIDs should work. What about imagemin I'd suggest to ask its authors. Try to spell it as cleanupIDs for starting point.

koraysels commented 7 years ago

I tried spelling it cleanupIDs to no avail.. looks like the options do not pass on to the actual imagemin process...

meze commented 5 years ago

Found in google, worked for me: svgoPlugins: [{removeViewBox: false}, {cleanUpIDs: false}]

XhmikosR commented 3 years ago

@TrySound maybe this can be closed too?