Online Font Awesome 5 Minimiser ("treeshaker")

Font Awesome 5 is great, but its very big. The SVG (javascript) free version is now over 1 MB, and the PRO version over 3 MB.

The javascript is made up of 30K of code, and the rest is SVG definitions of the 1,500 (4,500 - PRO) icons. This utility strips out all the icons you don't use, just leaving the 20 or so you actually need. This reduces the SVG/javascript file to 40K or so.

It works with both free and PRO versions.

[Jul-19] There is now an official solution for PRO users. A script that loads the core javascript, then reads through your HTML for icons, then loads their SVG's as needed. You are reliant upon their CDN for the code and SVG icon files however.

1 : Load the SVG Javascript file

Either:

or

Now would be a good time for a cup of tea.

SVG/JS loaded : 0 K

2 : Make a list of the icons you use

3 : Minimise

This strips out the icons you are not using. You can tweak the 'keep' list above, and minimise again.

4 : Save

Tips:

Minimised Javascript