3 ms·
They aren't all under 1KB, but there a few repos on GitHub hosting all of the Font Awesome icons as SVG. Also, if you can avoid it, don't use <img src… to disp
by freshyill 9y ago
They aren't all under 1KB, but there a few repos on GitHub hosting all of the Font Awesome icons as SVG.
Also, if you can avoid it, don't use <img src… to display SVG images, as the article suggests. By using <svg… directly, you avoid extra requests, you gain the ability to manipulate them directly in the DOM, and to restyle them.
https://github.com/ivanvotti/font-awesome-svg/tree/master/SVG https://github.com/ivanvotti/font-awesome-svg/tree/master/SV...
- grenoire 9y agoUnfortunately you cannot reuse the icons that way, which does end up being wasteful unless you use compression.
- EvilTerran 9y agoI believe you can define a <symbol> in one inline SVG, then <use> it in another, so that'd be a way to achieve icon reuse. Not sure how good browser support is for that, though - there's probably quirks.
- thinkloop 9y agoYou can reuse inline icons with JS - for example if you made a react component of it.
- deleted 9y ago[deleted]
- freshyill 9y agoThat’s incorrect. You definitely can reuse them using symbol and defs/use.