Font-awesome: Font Awesome 5 SVG with JS - Huge File Size

Created on 1 May 2018  路  1Comment  路  Source: FortAwesome/Font-Awesome

I'm currently using the webfonts from v4 and was looking to upgrade to v5. I noticed that the SVG with JS file (all.min.js) is about 700KB and even the gzipped version is about 290KB.

Isn't the huge file size an issue?

In the current version, Font Awesome woff2 file that gets downloaded is about 70KB (1/10th). I counted that my site was using about 20 icons and I was planning to hand-pick them and serve just those.

Is it really worth getting SVG with JS?

question

>All comments

Hi!

Thanks for being part of the Font Awesome Community.

Is it really worth getting SVG with JS?

It depends on your use case. You can go for webfont on FA5 too: https://fontawesome.com/get-started/web-fonts-with-css

You can also customize font awesome and create a subset (at the moment there are no official ways of doing this, just gread third-party online tools): https://github.com/FortAwesome/Font-Awesome/wiki/Customize-Font-Awesome

If you are concerned about the file size, you can take advantage of tree shaking: https://fontawesome.com/how-to-use/use-with-node-js#tree-shaking

I really do like SVG + JS + tree shaking with webpack.

Hope it helps, closing here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brystfire08 picture brystfire08  路  3Comments

huuphat picture huuphat  路  3Comments

AndersDK12 picture AndersDK12  路  3Comments

Eschwinm picture Eschwinm  路  3Comments

faithdong picture faithdong  路  3Comments