Page 1 of 1

How to add FA icons and not make page weight high

Posted: Wed Mar 13, 2019 10:24 pm
by tommy888
WB publishes the whole fontawsome icon file and it increases page weight drastically. Is there a chance to make it so that only links to the used icons in the project where published?

It's possible manually add a link to every icon but I'd prefer to use WB to do the job.

I mean WB adding the link to FA in the head

" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">

and link to the chosen icon in the body
<i class="fab fa-adobe"></i>

and then generate code for personalised style.

Is it possible or planned in the future?

Thanks for reply.

Re: How to add FA icons and not make page weight high

Posted: Thu Mar 14, 2019 7:02 am
by Pablo
You can also publish the Font Awesome Icon (and other icons) as single SVG image.

Re: How to add FA icons and not make page weight high

Posted: Thu Mar 14, 2019 6:17 pm
by tommy888
Pablo that's a kind of solution. Is there an option in WB to choose how icons are published? Thank you.

Re: How to add FA icons and not make page weight high

Posted: Thu Mar 14, 2019 7:19 pm
by Pablo
You can set the output format in the properties of the FontAwsome icon.

Re: How to add FA icons and not make page weight high

Posted: Sat Mar 16, 2019 6:18 am
by tommy888
Great Pablo!
But there might be a global option in Publish Mananger to set publish fontawesome, icons as SVG. It really reduces pageweight and time in my case and many others who care about loading times:)
I need to do it manually with every single icon whatever it is fontawesome, icon font, shape etc

Thanks