HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
svg
svgo
JavaScript2012–2026
svg / svgo

svgo

SVG Optimizer for Node.js and CLI. ⚙️

23Distinct people
26Mentions
0Explicit recommenders
22.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

SVG Optimizer for Node.js and CLI. ⚙️

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 7:24:48 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year26 dated mentions

Observed mentions: 2012-12-06 09:27:22 UTC to 2026-08-01 10:01:42 UTC.

0123452012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC312
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC505
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC220

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
SVGO SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. 💖 Sponsor SVGO on Open Collective to support continued improvements in stability and performance. 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 globally through npm, yarn, or pnpm. Alternatively, drop the global flag (global/-g) to use it in your Node.js project. # npm npm install -g svgo # yarn yarn global add svgo # pnpm pnpm add -g svgo Command-line usage Process single files: svgo one.svg two.svg -o one.min.svg two.min.svg Process a directory of files recursively with -r/--recursive and -f/--folder: svgo -rf path/to/directory_with_svgs -o path/to/output_directory Help for advanced usage: svgo --help Configuration SVGO has a plugin architecture. You can read more about all plugins in Plugins | SVGO Documentation, and the default plugins in Preset Default | SVGO Documentation. SVGO reads the configuration from svgo.config.mjs or the --config path/to/config.mjs command-line option. Some other parameters can be configured though command-line options too. svgo.config.mjs export default { multipass: false, // boolean datauri: 'base64', // 'base64'|'enc'|'unenc' js2svg: { indent: 4, // number pretty: false, // boolean }, plugins: [ 'preset-default', // built-in plugins enabled by default 'prefixIds', // enable built-in plugins by name // enable built-in plugins with an object to configure plugins { name: 'prefixIds', params: { prefix: 'uwu', }, }, ], }; Default preset Instead of configuring SVGO from scratch, you can tweak the default preset to suit your needs by configuring or disabling the respective plugin. svgo.config.mjs export default { plugins: [ { name: 'preset-default', params: { overrides: { // disable a default plugin cleanupIds: false, // customize the params of a default plugin inlineStyles: { onlyMatchedOnce: false, }, }, }, }, ], }; You can find a list of the default plugins in the order they run in Preset Default | SVGO Documentation. Custom plugins You can also specify custom plugins: svgo.config.mjs import importedPlugin from './imported-plugin'; export default { plugins: [ // plugin imported from another JavaScript file importedPlugin, // plugin defined inline { name: 'customPlugin', params: { paramName: 'paramValue', }, fn: (ast, params, info) => {}, }, ], }; API usage SVGO provides a few low level utilities. optimize The core of SVGO is optimize function. import { optimize } from 'svgo'; const result = optimize(svgString, { path: 'path-to.svg', // recommended multipass: true, // all other config fields are available here }); const optimizedSvgString = result.data; loadConfig If you write a tool on top of SVGO you may want to resolve the svgo.config.mjs file. import { loadConfig } from 'svgo'; const config = await loadConfig(); You can also specify a path and customize the current working directory. const config = await loadConfig(configFile, cwd); License and Copyright This software is released under the terms of the MIT license. Logo by André Castillo.
Read the full README on GitHub

What Hacker News says

1 sources
With font awesome, you are automatically using all of the icons however most sites likely use about 1%-5% of the total available icons. That means using font awesome is an unnecessary bloat on most sites. It would be nice if you could download each icon as a separate SVG (maybe you can, I didn't see how). I prefer to find the SVG elements I need and base64 encode them directly into my CSS. That way you only include the assets you are using, minimize total KB and network requests. There are two tools I use to help with this: 1. https://github.com/svg/svgo (node) 2. https://gist.github.com/mrinterweb/11303706 (ruby - I wrote this one)
In Font Awesome 4.1 released

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.