Give file from javascript to UX

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 :

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

And I require it at my main.js

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

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

<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?

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

Thanks :slight_smile:

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

But ofcourse :slight_smile: