My server request is returning image/png content type header. Server link is like this: http://locahost/PrintView?locate=12,12
My browser is showing image successful.
But I need to get image via ajax call. But ajax result is coming encoded format.
So I can not appent it to html img or another element.
$.ajax({
url: "http://localhost:7741/PrintView/Crop",
type: "GET",
crossDomain: true,
data: { "locate":param },
success: function (response) {
$('#crop').html('<img src="' + response + '" />');
console.log(response)
},
error: function (xhr, status) {
alert("error");
}
});