How to display an image in a page using the string attribute?
Using API I imported an entity which is having an image as a string attribute. Now I want to display this image on a page. How can I do this?
If it is base64 encoded do the following
Create an image object
Use the Base64DecodeToFile function from the File Handling module (https://appstore.home.mendix.com/link/app/63667/Mendix/FileHandling) to decode the base64 string to the image object
Then use that object to show the data in your pages
If it is just a filepath (e.g. url either retrieve the file and store it locally or use the Image viewer widget from the appstore to show it https://appstore.home.mendix.com/link/app/65122/Mendix/Image-viewer
I would create an entity that inherits from system.image and then use the community commons java action Base64DecodeToFile to store the image.