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]”
Here’s my code from the Tests tab
const
XMLbody = xml2Json(responseBody);
photo = XMLbody[‘QuercusMessageLink’][‘payload’][‘PersonPhotograph’][‘personPhotographRecord’][‘image’];
//console.log(photo);
const template = <img src="data:image/jpeg;base64, {{image}}" />
pm.visualizer.set(template, {image: photo})