Skip to content

svg-utils/svgo-ll

Repository files navigation

svgo-ll npm

svgo-ll is a Node.js library and command-line application for optimizing SVG files, evolved from the SVGO package. svgo-ll is focused on lossless optimization and compression.

Why?

SVG files, especially those exported from vector editors, usually contain a lot of redundant information. This includes editor metadata, comments, hidden elements, default or suboptimal values, and other stuff that can be safely removed or converted without impacting rendering.

Installation

You can install svgo-ll globally through npm. Alternatively, drop the global flag (-g) to use it in your Node.js project.

# npm
npm install -g svgo-ll

Command-line usage

To process a single file with the default settings for svgo-ll version 5:

svgo-ll -i one.svg -o one.min.svg

To process a single file with the latest settings (which will become the defaults for svgo-ll version 6):

svgo-ll --preset next -i one.svg -o one.min.svg

For more detailed options, see the command line option documentation or FAQ.

License and Copyright

This software is released under the terms of the MIT license.