Receiving link to an image added into a module

Question

How can I get a link to a picture added in the Images module section?

Answer

To receive the link to an image added into a module:

1. Add a dependency for the Terrasoft  library into define

2. Receive the picture config:

var imageConfig = resources.localizableImages.ImageListSchemaItem1;

The image name will be different.

3. Convert the config into a link:

var link = Terrasoft.ImageUrlBuilder.getUrl(imageConfig);

 

Like 0

Like

Share

0 comments
Show all comments