Reference Image through custom script

Hi IF Team,

Is there any way to refer to an Image (file path or content library) through a custom script?
I would like my Image asset to show different images depending on the values in my HCMS Base.

How could I achieve this?


Milan Jacobs

Hello @MilanAdaptable,

It is possible to reference the file path to an image in your content library, but it will only work if it is an absolute path, meaning it would need to be updated for each Player you deploy the experience to.

There are a several ways to do what you are looking to accomplish that would not requiring referencing the file path in a custom script, it would depend on how your experience is setup. I would recommend submitting a ticket with us via our support channel. There we will ask you to share your experience with us ( so we can suggest the best approach.