Web Icons with No External Libraries! (🙅 No More Font Awesome)

  Рет қаралды 75,784

Eric Murphy

Eric Murphy

Күн бұрын

Don't you hate when you're using Font Awesome, and it loads 500KB of JavaScript just to render 3 ICONS? You don't have to rely on big fat external libraries to do it for you! You can do it all by yourself, just grab the SVG and you're good to go! Watch the video to learn more (what big external libraries DON'T want you to know...)
The site I was using for the icons:
iconify.design/
🌐 ericmurphy.xyz/
Affiliate links to services I use:
www.vultr.com/... Get a VPS to host your website or server.

Пікірлер: 127
@ChumX100
@ChumX100 3 жыл бұрын
You're missing the whole point of Iconify. Their library is just about 13kb and it replaces the icon tags with svgs automatically, by loading them dynamically from an API. It also caches the loaded icons locally so that they are only loaded once and new requests and pages that use the same icons won't incurr any further overhead.
@schlepers
@schlepers 4 жыл бұрын
Thanks alot man. I was able to increase my Google lighthouse performance a bit by swapping out of the AwesomeFont kit code vs SVG. Much appreciation!!
@EricMurphyxyz
@EricMurphyxyz 4 жыл бұрын
Love to hear it!
@moaaz_hassan
@moaaz_hassan Жыл бұрын
Thanks but what about size of code i tried to put the svg icons on my website on blogger i noticed that code size increased from 40kb to 50kb how to fix it.
@DoompyGames
@DoompyGames 2 жыл бұрын
That's the most useful tip I have heard in a while, thank you sir. I found literally zero sources on how to get rid of the bloat introduced by font-awesome. In a plain nextjs application, with the different setup strategies for font-awesome or fort-awesome, the minimum you can achieve is an additional 20kb loaded for all of your pages. That refers to around 10% of additional chunk size per page.
@EricMurphyxyz
@EricMurphyxyz 2 жыл бұрын
Love to hear it! Glad it helped
@gaetandesignz4599
@gaetandesignz4599 3 жыл бұрын
Great video !!! It makes your website load faster, but it takes a bunch of lines that a boring thing sometimes exp if you have consecutively five.
@codebasic8558
@codebasic8558 2 жыл бұрын
This is wonderful! Thank you very much, good sir!
@ArsenTech
@ArsenTech 3 жыл бұрын
Iconify Fixed My Website Icons, Thanks So Much
@gopalloharnew5948
@gopalloharnew5948 2 жыл бұрын
That's what I wanted !
@gopalloharnew5948
@gopalloharnew5948 2 жыл бұрын
How to use svg's in css without smashing it into html ? like keeping it in another file .. but the fill becomes a problem !
@PLuffy-ke7ho
@PLuffy-ke7ho Жыл бұрын
This was awesome! I tried to use Font Awesome but couldn't get the kit to load properly with my site. This is a nice alternative and taught me more about a different attribute. Many thanks!
@jeslela
@jeslela Жыл бұрын
Thanks for this simple and straight to the point video! 👏🏽
@madtho
@madtho 3 жыл бұрын
Awesome, thank you. Had to tweak some styles to work with the svg, but looks and works great.
@bartickmaiti3049
@bartickmaiti3049 3 жыл бұрын
Thanks man.
@TheNomanAhmed
@TheNomanAhmed 4 жыл бұрын
Thanks Eric this is great video. I had been using FA in many of my projects and this is a great way to optimize the size. But i am just wondering how would you approach the problem if we have to use FA in the pseudo elements in css. Would there be a better way to do it ?
@EricMurphyxyz
@EricMurphyxyz 4 жыл бұрын
Thanks! Yes, copy the SVG code and convert it to a data URL using a site like this: yoksel.github.io/url-encoder/ Now you can use it like a background-image in CSS. You have to manually style the pseudo-element it to make it look right so not be as convenient as FA, but still works well.
@TheNomanAhmed
@TheNomanAhmed 4 жыл бұрын
@@EricMurphyxyz Thanks for the reply. I will try this approach. 👍🏽
@R.A.G.U.L
@R.A.G.U.L 4 ай бұрын
You are a fucking genius broo☠Even after 3years you solved my problem
@timawid
@timawid 2 жыл бұрын
actually font awesome gives me some problem not letting the icon apear. i wont ever use fontawesome Thanks❤❤
@williammcdermed7287
@williammcdermed7287 Жыл бұрын
Thank you for your response. I failed to mention how helpful your video was because it gave me the info to just tackle the whole use of svg's in a very direct way. You are right the only thing that was helpful from FA was the svg. So thanks again!
@skilllearn904
@skilllearn904 3 жыл бұрын
thanks broyher thats help me alot ,good work
@helloanshu4080
@helloanshu4080 Жыл бұрын
thanks mate!
@GulfJobSeeker_Vacancies
@GulfJobSeeker_Vacancies 2 жыл бұрын
Thanks a lot for giving this simple but logical solution.
@PhilipProchazka
@PhilipProchazka 3 жыл бұрын
yeah that is what i knew also before, i wanted to actually create my own font library, I do also fight here to get more than font awesome into my new angular template, so i guess it will be easier to stay into my known practics i understand and that buch will go propably down. you can also store those svgs into a folder and call them by name i guess after setting to include & require that folder and than callin those svg elements
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Yeah that's another more efficient method if you don't mind doing that yourself 👍
@coodie
@coodie Жыл бұрын
Great video explanation. Loved that you showed the amount of resources before and after. Thanks for the video!
@bettercalldelta
@bettercalldelta Жыл бұрын
You could probably still use the fontawesome tags but make a server-side script to "compile" it into what will actually be served to the client.
@dominikchynoradsky4228
@dominikchynoradsky4228 3 жыл бұрын
Good thinking sir, thank you.
@j.m.p.8739
@j.m.p.8739 Жыл бұрын
remove the xlmns and let's see if it loads the icon.
@septimusforster
@septimusforster 10 ай бұрын
Is there a workaround to subscribe multiple times on a KZbin channel? This one definitely deserves it.
@HeitorYT
@HeitorYT Жыл бұрын
I use preact for my projects and using local svg is the best thing. It doesn't show any errors.
@hamzakhiar3636
@hamzakhiar3636 Жыл бұрын
I'm kind of thinking on making a community plug-in on for instance figma where designers design icons and stuff and getting them with JavaScript as svg's or png's and replace font awesome
@christianworld2
@christianworld2 6 ай бұрын
Thanks man. This video is really helpful. Have really tried others but didn't work until i met this video
@mtycoder
@mtycoder 3 жыл бұрын
im using boxicons and is open source, besides that with that library they easily allow you to copy the SVG file, give them a try.,
@Gyannea
@Gyannea Жыл бұрын
This is where I want to go, but I could not get the font size to work. I had to delete the width and height and do width and height in css instead. Is that because my svg icon width and height units are px?
@nelsonazolukwamprojects
@nelsonazolukwamprojects 3 жыл бұрын
I thought the browser downloads the files once, or is downloaded on every request?
@frank-lx2yn
@frank-lx2yn 9 ай бұрын
thank you very much! 🙏🙏🙏🙏
@aneeshrc6848
@aneeshrc6848 3 жыл бұрын
Thank you bro it's working 💓💓💓😊😊😊😊😊😊
@nelsonazolukwamprojects
@nelsonazolukwamprojects 3 жыл бұрын
Wonderful content though. never knew that existed.
@musicallife3062
@musicallife3062 3 жыл бұрын
Thanks bro I was not able to use font awesome Thanks for this vedio
@mouctechy
@mouctechy Жыл бұрын
thank you my dude was looking an alternative to optimize my portfolio 👏👏
@AnthonyJackman
@AnthonyJackman 10 ай бұрын
Awesome video! Something so simple. I am running into the same thing you did with FA. I am only using 2 icons out of FA. The difference in my project is that I am doing a build using SASS. Your way may seem a little management work on the developer, but that effort pays dividends with site users. Thank you for making this!
@samo4502
@samo4502 2 жыл бұрын
niceeeeeee thanks and i like it
@biyanwho
@biyanwho 2 жыл бұрын
The real question is, how do you display this icon as pseudo element
@craigburton4447
@craigburton4447 2 жыл бұрын
Could you perhaps save the SVG to your images folder and put it's URL in the content " " property? I haven't tried it, but that's what I would try first
@bettercalldelta
@bettercalldelta Жыл бұрын
turn it into a data url
@mohamed-tm8kr
@mohamed-tm8kr Жыл бұрын
thank you bro, you saved my life i love you
@MuhammadAkbar-sy7zm
@MuhammadAkbar-sy7zm 2 жыл бұрын
Thank you. I have been looking for this solution, avoiding those unnecessary external libraries
@MicRodrgz
@MicRodrgz Жыл бұрын
thanks for the idea! subscribe done 👍
@Ilyas_Alrai
@Ilyas_Alrai 3 жыл бұрын
But as programmer you allways want a way simplify things and let machine do all stuff for you instead of copying every single icon code. I think javascript itself is a bloated language but we use it anyways because it does the job.
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
There are more efficient ways to use icons without bringing in the bloated Font Awesome library. I know react-icons for React is good, but I'm not sure of an easier way to do it in just HTML. That said, I only really need around 5 icons for a given website and copy & pasting a small amount of icons is not a big deal for me. The performance savings are worth it for me, but it's up to you.
@MarttyLovato
@MarttyLovato Жыл бұрын
genio te quiero mucho
@wolfenrico
@wolfenrico 2 жыл бұрын
Awesome. Thanks!
@peterpeter8421
@peterpeter8421 5 ай бұрын
たすかったよ ありがとう
@williammcdermed7287
@williammcdermed7287 Жыл бұрын
Thanks man. I got the same result without "identify", just grab the SVG code from FA and parse as you did.
@EricMurphyxyz
@EricMurphyxyz Жыл бұрын
Yes you don't need iconify, they just make it a little easier than going through the Dev tools
@jimohyinka4895
@jimohyinka4895 Жыл бұрын
this looks nice, but I think a link would be needed?
@EricMurphyxyz
@EricMurphyxyz Жыл бұрын
You mean an attribution link?
@vishveshpratapsingh
@vishveshpratapsingh 3 жыл бұрын
Thanks bro
@softwarereviews2496
@softwarereviews2496 3 жыл бұрын
Thanks Dear Give me to great skills
@tameemsani7387
@tameemsani7387 2 жыл бұрын
it was really help full ....thank you
@9squares
@9squares Жыл бұрын
Just what I was looking for, Thank you
@md.ridwanulhassanrafi6851
@md.ridwanulhassanrafi6851 3 жыл бұрын
thanks a lot 🤍🤍
@nyuentreprise3402
@nyuentreprise3402 2 жыл бұрын
Thank you very much buddy !🙌
@limehouseblues
@limehouseblues 3 жыл бұрын
thank-you, this was very helpful
@alexhardao2742
@alexhardao2742 10 ай бұрын
wow nice tip!
@acke5180
@acke5180 3 жыл бұрын
Great job! You just gave me a homeWork.. :) Subscribed. Keep up the good work!
@sonoftroy8572
@sonoftroy8572 Жыл бұрын
Very informative, I didn’t think to monitor the amount of data being loaded using font awesome. I’v learned something today. Thanks
@TheTimeProphet
@TheTimeProphet 3 жыл бұрын
I do a similar thing, but you can put all your svg icons into one file and give them an id and use xlink to show them. This way you only have one file to load, as it gets cached. eg This code would show the icon with the id of hat. The svg file can have hundreds of icons with a different id. Of course you have to set the width and height in css, as SVG has to have a width and a height. Let me know if you want to know more
@TheTimeProphet
@TheTimeProphet 2 жыл бұрын
@Entertainment Roller Coaster I am always around
@TheTimeProphet
@TheTimeProphet 2 жыл бұрын
@Entertainment Roller Coaster Once you made your file. Use the first code I posted to show it. eg Just change the xlink line to whatever icon you want to show eg
@TheTimeProphet
@TheTimeProphet 2 жыл бұрын
@Entertainment Roller Coaster You have all your icons in one file. That means your icons will load faster as it is one call to the file. As for the individual icons you can either make them yourself in illustrator and export the data, or download and use other peoples svgs. I do a bit of both. the important part is the viewBox, and the paths. Personally I would optimise your svg online before putting it in the file. This removes all the unnessary groups which you don't need on the web. I also remove colours. Then you can colour your svg using css.
@marcelositonio2495
@marcelositonio2495 5 ай бұрын
Awesome :)
@deadlock7946
@deadlock7946 Жыл бұрын
Just wow. Thank you so much!!!
@mrtmore1038
@mrtmore1038 2 жыл бұрын
Thank you!
@timawid
@timawid 2 жыл бұрын
Thanks bro
@samuelthomas5494
@samuelthomas5494 3 жыл бұрын
Thank you for sharing this video :-)
@giovannimichel5506
@giovannimichel5506 2 жыл бұрын
Thank you for the intel.
@kamdanibwp
@kamdanibwp 9 ай бұрын
جزاک اللہ خیرا
@sharonamaina3553
@sharonamaina3553 2 жыл бұрын
Thank you
@torg27
@torg27 Жыл бұрын
this is really brilliant!! thank you!!
@dc-tlc9654
@dc-tlc9654 2 жыл бұрын
Thanks 👍
@gudneighbour
@gudneighbour 8 ай бұрын
thanks
@tomslaterdesignillustratio4391
@tomslaterdesignillustratio4391 2 жыл бұрын
Genius!
@greggregory9029
@greggregory9029 2 жыл бұрын
you helped me! thanks
@Nature-calm-song
@Nature-calm-song 2 жыл бұрын
Awesome
@ilovancristian
@ilovancristian 2 жыл бұрын
thx
@digitalminister5687
@digitalminister5687 3 жыл бұрын
You save cellular data as well this way! Thank you for the video!
@madihamuhammad4633
@madihamuhammad4633 3 жыл бұрын
Thanks man.u saved my time .
@kedigiller111
@kedigiller111 2 жыл бұрын
really helpfull, thanks a lot
@luckybairagi7294
@luckybairagi7294 3 жыл бұрын
which OS are you using??
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Arch Linux!
@agentsmith2189
@agentsmith2189 2 жыл бұрын
ty
@atmanvisual190
@atmanvisual190 3 жыл бұрын
Lovely video, man. Thanks a lot.
@olga_lc
@olga_lc 2 жыл бұрын
Thanks a lot, that was helpful!
@TarunChkravarthi
@TarunChkravarthi 3 жыл бұрын
That really looks cool! Any suggestions to avoid too much svg code which could get hard to identify the specific icons when we are working on big projects or massive codebase? Just like creating our own icon-fonts using any svg code we choose for? Keep going!
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Thanks! You can move all the SVG code to a separate file and replace it with inside the SVG tag.
@muhammadhaiqal531
@muhammadhaiqal531 Жыл бұрын
@@EricMurphyxyz how can I do that?
@EricMurphyxyz
@EricMurphyxyz Жыл бұрын
@@muhammadhaiqal531 I explained it pretty clearly? Copy the SVG code to a separate file, name it something like your-icon.svg and then reference it with the tag I showed above
@muhammadhaiqal531
@muhammadhaiqal531 Жыл бұрын
@@EricMurphyxyz yes I did exactly that, but somehow it doesn't work, but I figured a workaround so yeah
@caesarliftz
@caesarliftz Жыл бұрын
@@muhammadhaiqal531 i tried too, but it didn't work
@Ayomikun
@Ayomikun 3 жыл бұрын
I'm probably just being silly, but is this definitely allowed?
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Font Awesome is under an open source license, so it's all good.
@Ayomikun
@Ayomikun 3 жыл бұрын
@@EricMurphyxyz Thanks, this is fucking awesome then 🤣
@asdffacil
@asdffacil 2 жыл бұрын
Nice tip
@jeffbarnhart6441
@jeffbarnhart6441 Жыл бұрын
love how you go into dev tools. perfect video.
@jaykay5486
@jaykay5486 3 жыл бұрын
Would this work with the code from Illustrator SVG,
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
I would assume so, should work with any SVG code.
@ishaanagarwal
@ishaanagarwal 3 жыл бұрын
Thank you so much!!! ❤️
@nikachkhobadze7710
@nikachkhobadze7710 3 жыл бұрын
Really useful. Thanks
@alexdem98
@alexdem98 2 жыл бұрын
Very nice!
@jake445
@jake445 2 жыл бұрын
This kind of video is what I needed. I am very much a beginner, but I wondered why I have to link huge external libraries, when I needed only 1-2 icons. Lots of unused codes in the libraries, and damn, now I am using svg, it makes codes appear larger, but i just embed it inside span tag and collapse it.
@rakeshmanathana
@rakeshmanathana 3 жыл бұрын
Very helpful. Thank you.
@wolfenrico
@wolfenrico 3 жыл бұрын
Thats great! Thanks!
@digitalminister5687
@digitalminister5687 3 жыл бұрын
Iconmonstr has many cool icons as well
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Nice, great resource! Never heard about this before
@golf_wangg48
@golf_wangg48 2 жыл бұрын
@ck0024
@ck0024 3 жыл бұрын
I use boxicon
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Wow, there's a lot of great icon resources I never knew about
@thakurtilak2860
@thakurtilak2860 2 жыл бұрын
Thank you, you have shown easy path otherwise I was getting box instead of icon i desired.Thanks again to solve it without going through all that process.By do by, u decoded font-awesome secret so its coming for u.
@donmorris4506
@donmorris4506 3 жыл бұрын
Dude, just get a font awesome pro license and then can include just the icons you want.
@EricMurphyxyz
@EricMurphyxyz 3 жыл бұрын
Even the official Font Awesome library brings in a bunch of unnecessary JavaScript. React Icons is a lot more light weight.
@sovereignlivingsoul
@sovereignlivingsoul 2 жыл бұрын
that is a good suggestion until they close the sight or change their policies, using programs like GIMP and Inkscape to create your own icons would be a useful skill to learn.
@EricMurphyxyz
@EricMurphyxyz 2 жыл бұрын
There are still tons of ways to get the svg code without that specific website, it's not just something they can change their policies and remove. Making your own icons may be a useful skill but nobody is going to hand render a Facebook icon for their website
@sovereignlivingsoul
@sovereignlivingsoul 2 жыл бұрын
@@EricMurphyxyz yeah, i know, i think knowing how to insert svg files into their website is a god skill, that's all, your advice is sound.
Nobody Understands Online Privacy.
14:11
Eric Murphy
Рет қаралды 183 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 963 М.
The joker favorite#joker  #shorts
00:15
Untitled Joker
Рет қаралды 30 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 70 МЛН
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,7 МЛН
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2,1 МЛН
Setting up Font Awesome icons as pseudo-elements
17:15
Kevin Powell
Рет қаралды 66 М.
Make Awesome SVG Animations with CSS // 7 Useful Techniques
12:20
Can You REALLY Trust Proton Mail?
16:57
Eric Murphy
Рет қаралды 213 М.
A beginners guide to SVG | Part One: The Why, What, and How
14:22
Kevin Powell
Рет қаралды 361 М.
I wasted my 20s online.
12:34
Eric Murphy
Рет қаралды 73 М.
Use these instead of vh
6:06
Kevin Powell
Рет қаралды 511 М.
Web Awesome with Konnor Rogers + Cory LaViska
1:01:07
Syntax
Рет қаралды 2,5 М.
Generate your own icon font (with autocompleting icons)
4:32
AM Design
Рет қаралды 10 М.
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 644 М.
Why Do I Care So Much About Privacy?
15:30
Eric Murphy
Рет қаралды 266 М.
The joker favorite#joker  #shorts
00:15
Untitled Joker
Рет қаралды 30 МЛН