# Jpeg image not rendering in visualizer when base 64 retreived from XML message

**URL:** <https://community.postman.com/t/jpeg-image-not-rendering-in-visualizer-when-base-64-retreived-from-xml-message/47592>\
**Category:** Help Hub\
**Tags:** visualizer\
**Created:** [May 18, 2023, 10:47am UTC](https://community.postman.com/t/jpeg-image-not-rendering-in-visualizer-when-base-64-retreived-from-xml-message/47592 "2023-05-18T10:47:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobbyscott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@bobbyscott](https://community.postman.com/u/bobbyscott)\
**Post date:** [May 18, 2023, 10:47am UTC](https://community.postman.com/t/jpeg-image-not-rendering-in-visualizer-when-base-64-retreived-from-xml-message/47592/1 "2023-05-18T10:47:27Z")

</div>

Hello everyone,

I am struggling to get my jpeg image to render in visualizer. I am able to retreive the base64 code from the XML message. I have tested this by logging photo in console, copying that into the html template in an html tester.

So I think the point of failure is the pm.visualizer.set method. The result in visaulizer is the broken image icon. If I inspect this result I get this HTML. Does the [object Object] part point to my problem?  
\<img src=“data:image/jpeg;base64,[object Object]”  
 ![](data:image/jpeg;base64,[object%20Object])

Here’s my code from the Tests tab

const  
XMLbody = xml2Json(responseBody);  
photo = XMLbody[‘QuercusMessageLink’][‘payload’][‘PersonPhotograph’][‘personPhotographRecord’][‘image’];

[//console.log](https://console.log)(photo);

const template = `<img src="data:image/jpeg;base64, {{image}}" />`

pm.visualizer.set(template, {image: photo})

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [May 18, 2023, 1:03pm UTC](https://community.postman.com/t/jpeg-image-not-rendering-in-visualizer-when-base-64-retreived-from-xml-message/47592/2 "2023-05-18T13:03:17Z")

</div>

Have a look at the following and see if the solution to that applies to your situation.

[testing - how to visualize image in postman - Stack Overflow](https://stackoverflow.com/questions/73281561/how-to-visualize-image-in-postman)
