# Get MD5 of raw image

**URL:** <https://community.postman.com/t/get-md5-of-raw-image/3287>\
**Category:** Help Hub\
**Tags:** md5\
**Created:** [November 15, 2018, 5:29pm UTC](https://community.postman.com/t/get-md5-of-raw-image/3287 "2018-11-15T17:29:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snake\_404](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@snake\_404](https://community.postman.com/u/snake_404)\
**Post date:** [November 15, 2018, 5:29pm UTC](https://community.postman.com/t/get-md5-of-raw-image/3287/1 "2018-11-15T17:29:19Z")

</div>

Hi, I’m using postman version 6.4.2 in MacOS mojave 10.14, chrome version 69.0.3497.100.

I’m migrating my test from soapUI to postman and I have an script in groovy to get the MD5 of an image and then compares that md5 with another one but in postman I’m not getting the same MD5, I followed the answer from this issue [https://github.com/postmanlabs/postman-app-support/issues/2024](https://github.com/postmanlabs/postman-app-support/issues/2024) but I’m still not getting the right MD5. This is my Test in postman:

```
pm.test("Set image url", function () {
    var jsonData = JSON.parse(responseBody);
    var iUrl = pm.globals.get("myUrl");

    for(var i = 0; i < jsonData.images_array.length; i++){
        var image = jsonData.images_array[i];            
        var url = iUrl + "/" + image.url;

        pm.sendRequest(url, function(err, res){            
            var arr = res.stream;
            var str = String.fromCharCode.apply(String, arr);            
            var md5 = CryptoJS.MD5(str);
            console.log("md5 " + md5);
        });
    }
});

```

**To Reproduce**  
I send a GET request to the image and I’m getting the bytes of that image, then with my script I’m trying to get the md5 of the image but when I calculate the MD5 with the terminal, I got a different MD5, I don’t know if this can be achieved with postman or I’m doing something wrong.
