# Issue using custom icon with Tag Icons

**URL:** https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372
**Category:** Support
**Tags:** tag-icons
**Created:** [December 18, 2019, 8:11pm UTC](https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372 "2019-12-18T20:11:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kristof\_mulier](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kristof_mulier/32/164337_2.png) [@kristof\_mulier](https://meta.discourse.org/u/kristof_mulier)
#### Post date: [December 18, 2019, 8:11pm UTC](https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372/1 "2019-12-18T20:11:47Z")

</div>

Hi @pmusaraj ,  
I’ve installed the Tag icons theme component. These are my current settings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/4/f42b3ffce5114b3069b91a21f542805f93374a2d.png)

I’ve defined three tags that are attached to a **Font Awesome** icon:

- `bug-showstopper` attached to `skull-crossbone`
- `bug-major` attached to `exclamation-triangle`
- `bug-minor` attached to `exclamation-circle`

This works just fine. However, I try to attach the fourth tag `beetle` to my uploaded svg-file `beetle-face.svg`. Unfortunately, this doesn’t work.

How do I attach my own svg-file to a tag properly? Please help me step-by-step. I’m really a beginner here on discourse (just started today) and I have limited background in web technology.  
Thank you very much 🙂

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 18, 2019, 9:00pm UTC](https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372/2 "2019-12-18T21:00:20Z")

</div>

Hi @kristof_mulier, welcome to Discourse!

Here is how you can add a custom icon:

> [@Introducing Font Awesome 5 and SVG icons](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/1):
>
> **Adding custom icons**
> 
> If you would like to have more icons than what’s available in FontAwesome, you can add your own SVG icons in a plugin or a theme. See [this SVG sprite](https://raw.githubusercontent.com/discourse/discourse/master/vendor/assets/svg-icons/discourse-additional.svg) for an example of how to structure your sprite. (It’s essentially a list of `<symbol>` elements, each with its own unique ID.)
> 
> _In themes and components_ : add the SVG sprite in the `/assets` folder, and reference it in `about.json` using the variable name `icons-sprite` . For a sprite called `my-icons.svg` , your assets.json should include this:
> 
> ```plaintext
> "assets": {
> "icons-sprite": "/assets/my-icons.svg"
> }
> 
> ```
> 
> You can also add the SVG sprite to a theme or component via the UI, when doing so, make sure the SCSS var name is set to `icons-sprite` . Screenshot:
> 
> ![image.png](https://global.discourse-cdn.com/meta/original/4X/f/1/9/f193ce6ad9125fb89f471edbdd7bd3fbda1811b9.png)

Basically, you need to add the SVG icon to a sprite, give it an ID and then add the sprite to the theme and set the var name for it to `icons-sprite`. Once that’s done, you can use the ID of the icon like the FA icon ids (and don’t use the $ symbol).

---

<div class="post-metadata">

### Author: ![kristof\_mulier](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kristof_mulier/32/164337_2.png) [@kristof\_mulier](https://meta.discourse.org/u/kristof_mulier)
#### Post date: [December 19, 2019, 5:01am UTC](https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372/3 "2019-12-19T05:01:19Z")

</div>

Wonderful, this worked like a charm!  
Thank you @pmusaraj !  
You’re awesome 👍

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 21, 2023, 9:23am UTC](https://meta.discourse.org/t/issue-using-custom-icon-with-tag-icons/272372/4 "2023-07-21T09:23:55Z")

</div>

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