- SVGO now requires Node 4 or higher.
- Changed CLI syntax to treat filenames as input, thus allowing
svgo *.svg
syntax. SVGO.optimize()
now returnsPromise
.- Added
datauri
option to JS API. - Added support for SVG 2
href
attribute. cleanupIDs
now don't removes IDs if an image consists only ofdefs
.- New plugin
inlineStyles
for converting styles from<style>
element to attributes if possible (by @strarsis). cleanupNumericValues
now rounds values inviewBox
(by @caub).- New plugin:
removeScriptElement
(disabled by default) to align withremoveStyleElement
(by @pklingem). minifyStyles
now removes styles based on usage with controlling options (by @lahmatiy).- New option
except
incleanupIDs
to keep IDs (by @Velenir). - New option
force
incleanupIDs
to work even if SVG containsstyle
orscript
elements (by @Velenir). - Fixed arcs transforming with different signed
scale
parameters (by @JoshyPHP). - Fixed
removeUselessStrokeAndFill
to check forstyle
orscript
elements per file (by @caub). - New option
keepAriaAttrs
inremoveUnknownsAndDefaults
(by @davidtheclark). - Corrected parsing in
cleanupIDs
to account animation syntax (by @caub). #ff0000
now converts tored
as well as#f00
(by @davidleston).- Added “gray” variation to colors list per CSS Color Module Level 4 (by @ydaniv).
- Fixed error on empty files.
- A separator character in
removeAttrs
now can be changed perelemSeparator
option (by @mikestreety). addAttributesToSVGElement
now can add values to attributes.