Page 1 of 1

Images

Posted: Thu Apr 16, 2015 12:17 pm
by shabeer

Hi,

I want to update an image asset dynamically.

I have the png image (image123.png) in the media manager. I read a json object file using rest service. and I extract a string which points me to "../images/image123.png" and I map this string to the image objects asset.

With an online image, this works fine, but it does not for a file contained within the media manager. Please help..

Thanks


Images

Posted: Thu Apr 16, 2015 4:02 pm
by Illya Stepanov

Hi -

Suppose you have uploaded image file with Media Manager then you can use the following code to change image component with name 'imgLogo' this way:

precodeApperyio("imgLogo").attr('src','files/views/assets/image/c8e20a1fbf4e4a96844cee1660ec6275.png');
/code/pre