# Offline Custom Icons

**URL:** https://discourse.nodered.org/t/offline-custom-icons/58999
**Category:** Dashboard
**Tags:** node-red-dashboard
**Created:** [25 February 2022 22:33 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999 "2022-02-25T22:33:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sconey](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@sconey](https://discourse.nodered.org/u/sconey)
#### Post date: [25 February 2022 22:33 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999/1 "2022-02-25T22:33:04Z")

</div>

I would like to use an icon for a button that is not available in the awesome, weather or material design fonts. And although I was successful using iconify, this is only available while on-line, which does work as I need to be off-line.

I was able to host the icon locally on a web-server, and this worked when using a url in the icon field of the button configuration. But the icon is very small, and I see in the node-red-dashboard source-code that all images are hard coded to 24px. Probably a good reason for this, but causes me problems as I need a larger icon.

I can create my own button using an ui\_template, but hoping to find a way to use the button node. Self hosting iconify seems like a lot of work, and have not found a way to update the icons to later versions.

So, I found a solution by placing html and an ing tag in the label field and referencing the locally hosted image.. However, this seems like a bit of a hack. Wondering if anyone has solved how to locally host custom icons and use them as part of a button:

Node-RED version: v2.2.0. Dashboard version 3.1.5

 ![Screen Shot 2022-02-25 at 2.30.02 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a7cee318423e797632e6dc8091dae935c824fa9.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [26 February 2022 09:56 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999/2 "2022-02-26T09:56:27Z")

</div>

looks perfectly reasonable to me.

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [26 February 2022 20:50 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999/3 "2022-02-26T20:50:44Z")

</div>

You could always base64 encode the image and use an inline [data url](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) to host it in the html file.

```auto
<html>
  <img src="data:image/png;base64,SGVsbG8sIFdvcmxkIQ==">
</html>

```

That way there is no dependency on a remote server.

There is also the option to host the image from within the node using the [editor resources](https://nodered.org/docs/creating-nodes/resources)

```auto
<html>
  <img src="/resources/@scope/node-name/foo.png">
</html>

```

---

<div class="post-metadata">

### Author: ![sconey](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@sconey](https://discourse.nodered.org/u/sconey)
#### Post date: [27 February 2022 05:53 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999/4 "2022-02-27T05:53:04Z")

</div>

Thanks to both @dceejay and @hardillb. I did not know about [editor resources](https://nodered.org/docs/creating-nodes/resources), and I think this is a much cleaner solution. Thanks - stephen

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 March 2022 05:53 UTC](https://discourse.nodered.org/t/offline-custom-icons/58999/5 "2022-03-13T05:53:40Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
