You can follow the instructions from below link.
https://medium.com/mendix/building-a-pluggable-widget-url-image-viewer-6fd423858137
Hi Arda,
I have seen that article, but that is not the solution I am building.
I am adding a property type Image (see: Image Property Type ) to my project. It exposes its properties through the WebImage-interface found here: WebImage interface
However, querying WebImage.Uri does not yield any results.
However, if I cast my image to a DynamicValue<ImageValue> type, I get a list of all images that are part of the project (ThumbsUp, ThumbsDown & Exclamation)
I suspect that there is bug in that part of the interface.
Solution now is Stringify & Parse the JSON to an JSON object and check if the URI's are filled for the images. Not very efficient, but for now a workaround that does the trick. This is needed as the list is not recognized as a JSON object when created.
var list = JSON.parse(JSON.stringify(ThumbsUp));
if (list["ThumbsUp"]) {
ThumbsUpUri = list["ThumbsUp"]["value"]["uri"];
}
if (list["ThumbsDown"]) {
ThumbsDownUri = list["ThumbsDown"]["value"]["uri"];
}
if (list["Exclamation"]) {
ExclamationUri = list["Exclamation"]["value"]["uri"];
}