Skip to content

Instantly share code, notes, and snippets.

@isaumya
Created April 25, 2020 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaumya/695adfba22d2e6d7df11f8035bd18c5e to your computer and use it in GitHub Desktop.
Save isaumya/695adfba22d2e6d7df11f8035bd18c5e to your computer and use it in GitHub Desktop.
Optimize SVG files with SVGO

Install SVGO

Intsll the node js tool SVGO

$ [sudo] npm install -g svgo

Run Command

svgo *.svg --multipass --enable=removeMetadata,removeTitle,removeDesc

You can also specify the svg file

svgo assets/img/test.svg --multipass --enable=removeMetadata,removeTitle,removeDesc

Output to a different folder

svgo test.svg -o test.min.svg --multipass --enable=removeMetadata,removeTitle,removeDesc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment