# How do I use images from assets in HTML of a Glimmer-based theme component?

**URL:** https://meta.discourse.org/t/how-do-i-use-images-from-assets-in-html-of-a-glimmer-based-theme-component/398578
**Category:** Development
**Created:** [17 maart 2026 om 01:13 UTC](https://meta.discourse.org/t/how-do-i-use-images-from-assets-in-html-of-a-glimmer-based-theme-component/398578 "2026-03-17T01:13:15Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![das-g](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/das-g/32/441608_2.png) [@das-g](https://meta.discourse.org/u/das-g)
#### Post date: [17 maart 2026 om 15:15 UTC](https://meta.discourse.org/t/how-do-i-use-images-from-assets-in-html-of-a-glimmer-based-theme-component/398578/5 "2026-03-17T15:15:01Z")

</div>

With the hints here and [some help from the ask.discourse.com bot](https://ask.discourse.com/discourse-ai/ai-bot/shared-ai-conversations/iRRje4DGSzerXYzMUoqxWQ) I’ve managed to get it working:

- Here’s the [relevant commit](https://gitlab.com/geowebforum/discourse-tc-geowebforum-sponsors/-/commit/75e73bdaf277389f51037245d1edc350404d3313) on top of what the `discourse_theme` CLI generated.
- Here’s [the difference](https://gitlab.com/geowebforum/discourse-tc-geowebforum-sponsors/-/compare/ae47578d79cf3b2aac453e403976db767d699219..75e73bdaf277389f51037245d1edc350404d3313?from_project_id=80325622) to my previous unsuccessful attempt mentioned in the top post.

Thank you, @NateDhaliwal!

### Key things I struggled with on the way here:

- In the templates, neither arbitrary JavaScript expressions (such as function calls) nor filter expressions (of form `some-transormation-function someVariableOrLiteral`) work in the double curly braces. Only single variables can be interpolated there.
- For one of the two assets, I had forgotten to include the directory name `assets/` in the corresponding file path value in `about.json`. This failed silently, resulting in the corresponding setting to be `undefined`, which I guess caused the whole template to be silently omitted or something.
- At one point during development, the theme component synched by `discourse_theme watch ...` had no effect, whether in preview or explicitly activated. Letting `discourse_theme watch ...` create a new copy of the component on the instance (and deleting the previous copy) rectified that. Not sure what exactly had happened there.

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-use-images-from-assets-in-html-of-a-glimmer-based-theme-component/398578)._
