[SVG] Optimize SVGs for Better Performance using svgo

Just like a bitmap image, you can compress an SVG by removing various pieces of code that aren’t necessary to it rendering properly. This reduces file size & download time, ultimately leading to a faster page load speed. You’ll learn how to automate the process of compressing your SVGs using svgo in the command line.

For a full list of options and plugins available to use with svgocheck out their documentation.

 

Install:

npm i -g svgo

 

Run:

Optimize the svg inside the folder:

svgo -f icons -o icons/out

 

posted @ 2017-02-24 22:28  Zhentiw  阅读(259)  评论(0编辑  收藏  举报