Skip to main content
Aug 23, 2018 4:15 PM UTC
Question

dynamic image changing using java script to display media entities.

Hi,

I wanted to display image on selection of list item.

Different images has to be displayed based on input.

Now I am able to achieve it using simple JS where i provide link of google image in result and keeping my base type as image.But is it possible for me to keep media entity in result? 

That is when input is passed the result image has to be fetched from media entity.

How can I achieve this?

Please provide some help.

 

Thanks,

V Shalini.

4 replies

Aug 23, 2018 4:23 PM UTC

Use a ValueDisplay widget and just bind the image value to the ValueDisplay widget value property.

Aug 23, 2018 4:25 PM UTC

Hi Carles,

That is what I am doing right now, but I need to display the image from my media entitiy.

How can I do that?

Aug 23, 2018 4:26 PM UTC

You just need a service that returns the Image Media Entity url (or the infotable that fills the listwidget have a column with it's value)