How to host material icon offline in Node red?

Hello is it possible that material-icon of font-awesome will still work without an internet?
How to do it. I cant see any reference o how.

Thank you very much !

You need to check in a browser dev tools to see if any of the requests are made direct to the Internet - I would have thought that, in most cases, requests would be made to local installations.

For example, looking at the network panel in dev tools while loading the Node-RED editor, I can see that the request for font-awesome is going to my Pi and not to the Internet. Similarly for a separate request for the fontawesome-webfont. Also the same for my Dashboard, that only requests the webfont but again it is a local request, not an Internet request.

In general, I would never expect Node-RED flows or the web pages they create to call direct to the Internet. That is one of the advantages of Node-RED.

If you need to consume a single icon from FA, I strongly recommend grabbing the SVG version direct from their website and using that instead. You can either add it as a file to the static folder of Node-RED (see settings.js) or you could convert it into a data URL and include it in your page directly. I do that, for example, on my Blog which is statically generated.

Thanks man!
You always amazed me :grin:
I am totally new to Node-Red and I am creating now my first project so I had a lot of questions. :slight_smile: The good part is.. everytime I asked here in forum, it gives me a definite answer :slightly_smiling_face: Thanks man!!

1 Like

Well as usual - it's not quite that simple... :slight_smile:
The node-red-dashboard already has a load of icons built in including fa-icons 4.7 - and the angular material icons from here - - so if you restrict yourself to those then they are available locally.- If you need the full set of material icons then yes you have to get and host them if you need them offline. The dashboard does try to load them as a font as a background task it required - but obviously that is designed to fail if offline.

1 Like