# Dynamically setting an image source

**URL:** <https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958>\
**Category:** Help Requests\
**Created:** [November 27, 2018, 10:36pm UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958 "2018-11-27T22:36:00Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [March 29, 2020, 4:12am UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958/21 "2020-03-29T04:12:29Z")

</div>

I’m guessing it’s the different in terms of URL for dev environment. Can you show a pic comparing the url of a working and not working img?

---

<div class="post-metadata">

**Author:** ![SalkiDixit](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@SalkiDixit](https://discourse.aurelia.io/u/SalkiDixit)\
**Post date:** [April 22, 2020, 10:57am UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958/22 "2020-04-22T10:57:28Z")

</div>

hi,

\<img src="/93c4f490f073dbc3942fd7288d10ab97.svg\> // this is ![]()

---

<div class="post-metadata">

**Author:** ![SalkiDixit](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@SalkiDixit](https://discourse.aurelia.io/u/SalkiDixit)\
**Post date:** [April 22, 2020, 10:58am UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958/23 "2020-04-22T10:58:49Z")

</div>

\< img src="./…/…/…/…/…/static/images/dummy-pic2.svg"\>  
// this is \< img src="./…/…/…/…/…/static/images/dummy-pic2.svg"\> // hard coded one

\< img src="/93c4f490f073dbc3942fd7288d10ab97.svg \> // this is \< img src="${imgSRC}"\>  
please have a look

---

<div class="post-metadata">

**Author:** ![yhadari](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/yhadari/32/2539_2.png) [@yhadari](https://discourse.aurelia.io/u/yhadari)\
**Post date:** [July 3, 2024, 2:27pm UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958/24 "2024-07-03T14:27:01Z")

</div>

:src=“‘src/assets/’ + item.icon + ‘.svg’” This is work you should replase …/ with ‘src/’

---

<div class="post-metadata">

**Author:** ![gwennadf](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/gwennadf/32/2548_2.png) [@gwennadf](https://discourse.aurelia.io/u/gwennadf)\
**Post date:** [August 22, 2024, 5:23am UTC](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958/25 "2024-08-22T05:23:52Z")

</div>

To be honest I found it to be quite informative and helpful which makes it seem fantastic; As a new member I also read this post which was really helpful & i am looking forward to more conversations like this one.

[Previous page](https://discourse.aurelia.io/t/dynamically-setting-an-image-source/1958.md?page=1)
