Display image from url string
Hi everyone!
I'm having an issue regarding the images that are returned from an API response.
When I get the Products from an API like Rackbeat, the Products have a property called picture_url and usually come with something like: https://cdn.rackbeat.com/JIsTL1BSXE/8c183c31-41fb478c83dc50befd9743b98044944b/c/j2zmGdIUEBeC2YhflTHoT7hJ4T45HLGT-display.jpg
How can I display this as an image instead of the URL?
This is not just for the API that I refer to, I'm not being able to do this with the image URL at all...
-
Official comment
Hi Alexandre,
On the same entity where you have the picture_url property, go ahead and add a virtual calculated string property. Call the new property imgPictureUrl And the expression could look something like this: '<img src="' + [picture_url] + '" />'
Now you can use the imgPictureUrl instead as we put an img tag around your url and then we can display it as an image inside grids and labels.
This would do the trick for you!
Best regards Tobias
-
Yes! It Worked!!
Here some screenshots about this solution:
Thanks Tobias!
0 -
Glad that it worked for you!
0
Please sign in to leave a comment.
Comments
3 comments