Hello Raksha,
I am not sure if I understand you correclty, but maybe you can make use of the community commons module that enables you to decode and encode base64 strings.
See also the documentation:
https://docs.mendix.com/appstore/modules/community-commons-function-library/
Further it can be good to also read the documentation around filedocument and images:
https://docs.mendix.com/refguide/image-viewer/
The Nanoflow Commons module has a JavaScript action called Base64DecodeToImage that takes a Base64 encoded string and decodes it into a Mendix System.Image object. You can then use an Image widget to display this on a page in your application.
I hope this helps.