I have an API URL like http://example.com/images/crop.png.transform/pictures/image.png which returns only an image. The content type is image/png.
I need to write a postman test to make sure the image height and width are what's required. I tried with the following code but gets the error "There was an error in evaluating the test script: ReferenceError: document is not defined"
pm.environment.get("image")
var url = document.createElement("img");
url.src = pm.environment.get("image");
tests["url width"] = url.width === 640;
tests["url height"] = url.height === 960;