#  Adding  Image dynamically using each

**URL:** <https://forums.fusetools.com/t/adding-image-dynamically-using-each/5142>\
**Category:** Bug Reports\
**Created:** [February 19, 2016, 8:59am UTC](https://forums.fusetools.com/t/adding-image-dynamically-using-each/5142 "2016-02-19T08:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benantolisdimful](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/benantolisdimful/32/263_2.png) [@benantolisdimful](https://forums.fusetools.com/u/benantolisdimful)\
**Post date:** [February 19, 2016, 8:59am UTC](https://forums.fusetools.com/t/adding-image-dynamically-using-each/5142/1 "2016-02-19T08:59:57Z")

</div>

MainView.js

`category=[{"image":"Assets/1.jpg"},{"image":"Assets/2.jpg"},{"image":"Assets/3.jpg"}]`

MainView.ux

i’m Using Each Item="{category}" Image File="{image}" end of Each

now every time i run it. it works in local but not in my device. error:(Directory not found: Assets/1.jpg).

how can i access image in an array using each element?

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [February 19, 2016, 10:44am UTC](https://forums.fusetools.com/t/adding-image-dynamically-using-each/5142/2 "2016-02-19T10:44:51Z")

</div>

Hi!

In the current version (0.9.11) images must be declared in UX files in order to be bundled into the app bundle. This means you have to do this similar to how it is shown in these examples:

[https://www.fusetools.com/examples/navigation-animation](https://www.fusetools.com/examples/navigation-animation) [https://www.fusetools.com/examples/gallery](https://www.fusetools.com/examples/gallery)

Basically, declare each image in UX like this:

```ux
<FileImageSource File="Assets/Pictures/Unsplash6.jpg" ux:Key="Unsplash6" />

```

And then use the key (here: `Unsplash6`) as the handle from JS.

> In a near future version, you can specify what images to bundle in your unoproj, and point to it by filename in JS. However, this is not released yet as of 0.9.11

---

<div class="post-metadata">

**Author:** ![benantolisdimful](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/benantolisdimful/32/263_2.png) [@benantolisdimful](https://forums.fusetools.com/u/benantolisdimful)\
**Post date:** [February 22, 2016, 3:30am UTC](https://forums.fusetools.com/t/adding-image-dynamically-using-each/5142/3 "2016-02-22T03:30:50Z")

</div>

Hi Anders Lassen

I see… Thankyou for the response. Hoping to have that feature sooner. It is really needed for more dynamic data binding.
