# Give file from javascript to UX

**URL:** <https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842>\
**Category:** How-to Discussions\
**Created:** [May 9, 2016, 12:48pm UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842 "2016-05-09T12:48:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simo\_Santavirta](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/simo_santavirta/32/175_2.png) [@Simo\_Santavirta](https://forums.fusetools.com/u/Simo_Santavirta)\
**Post date:** [May 9, 2016, 12:48pm UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842/1 "2016-05-09T12:48:24Z")

</div>

Hey,

I’m creating a visual config for my app. I would like to give the image file to UX from javascript.

I have JS where :

```auto
module.exports = 
{
    "file" : "Assets/image.png"
}

```

And I require it at my main.js

```auto
var skin = require("skin/SkinRed");
module.exports.skin = skin;

```

I would like to pass that image path to my UX:

```auto
<Image File="{skin.file}" />

```

But I get “Could not find a part of the path ‘/Assets/image.png’”. This works perfectly fine with colors etc.

Should I include the image file in my project file or do it somehow differently?

---

<div class="post-metadata">

**Author:** ![Anders\_Bondehagen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_bondehagen/32/98_2.png) [@Anders\_Bondehagen](https://forums.fusetools.com/u/Anders_Bondehagen)\
**Post date:** [May 9, 2016, 2:22pm UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842/2 "2016-05-09T14:22:53Z")

</div>

Yes, you need to mark the file as a `"image.png:Bundle"` in your project.

---

<div class="post-metadata">

**Author:** ![Simo\_Santavirta](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/simo_santavirta/32/175_2.png) [@Simo\_Santavirta](https://forums.fusetools.com/u/Simo_Santavirta)\
**Post date:** [May 10, 2016, 6:14am UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842/3 "2016-05-10T06:14:40Z")

</div>

Thanks 🙂

---

<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:** [May 10, 2016, 6:58am UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842/4 "2016-05-10T06:58:00Z")

</div>

Or `Assets/*.png:Bundle` to auto-include all pngs in that folder 🙂

---

<div class="post-metadata">

**Author:** ![Simo\_Santavirta](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/simo_santavirta/32/175_2.png) [@Simo\_Santavirta](https://forums.fusetools.com/u/Simo_Santavirta)\
**Post date:** [May 10, 2016, 10:00am UTC](https://forums.fusetools.com/t/give-file-from-javascript-to-ux/2842/5 "2016-05-10T10:00:42Z")

</div>

But ofcourse 🙂
