View pictures in postman
Asked Answered
L

2

13

Is it possible to preview images for the Image URL responses in postman? If postman doesnt have such settings, then is there any plugins as such for that? Otherwise, suggest some tool which can help do. This is very much needed for an application that I am developing, so please help.

Lin answered 28/1, 2020 at 13:6 Comment(0)
W
11

This can be achieved using the pm.visualizer option and then setting the template to use basic img src HTML in the "Test" tab.

Example;

Free API that returns an image URL: https://dog.ceo/api/breeds/image/random

const jsonData = pm.response.json().message
pm.visualizer.set(`
<body>
<img src="${jsonData}">
</body>`);

enter image description here

If you then click on the "Visualize" tab you'll see the image...

enter image description here

Woody answered 20/2, 2022 at 17:28 Comment(0)
A
0

I'm using Postman V10.4.5. It works by default without any additional configuration.

Alejandrinaalejandro answered 23/11, 2022 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.