svgo

Installation
SKILL.md

SVGO

Overview

SVGO (SVG Optimizer) parses an SVG, runs a list of plugins and prints a smaller file. It removes editor metadata and comments, collapses groups, shortens path data and minifies attributes. The current release is 4.1.0 (Node.js 16+). Version 4 changed two defaults that older guides still assume: removeViewBox and removeTitle are no longer part of preset-default, so the viewBox and the <title> now survive unless you add those plugins. Plugin names such as removeScriptElement were renamed (removeScripts). The commands below were run against svgo 4.1.0.

Instructions

Install and run the CLI

$ npm install --save-dev svgo
$ npx svgo icons/cart.svg -o icons/cart.min.svg
icons/cart.svg:
Done in 9 ms!
0.473 KiB - 59.9% = 0.189 KiB

The CLI prints the saved percentage for every file. Without -o, the input file is overwritten in place, so commit or copy first.

Installs
19
GitHub Stars
197
First Seen
Jun 5, 2026