I need to display an thumbnail/image that comes from a POST request
Postman shows the output in right way
I\'m trying to use the same i
In order to display the image in the DOM, we need to convert from blob to base64. Here is the code
createImageFromBlob(image: Blob) {
let reader = new FileReader();
reader.addEventListener("load", () => {
this.imageToShow = reader.result;
}, false);
if (image) {
reader.readAsDataURL(image);
}
}
Also, make sure you use DomSanitizer injectable service by applying safeurl to image src.