I'm trying to convert the raw binary data of an image and then display it.
Steps to approach to the problem,
1. I have saved the raw binary data of images in my database.
Preview:
2. Fetch & Convert the data into a blob and then into a blob url.
const image = URL.createObjectURL(new Blob([ project.image ], { type: 'image/jpg' }))
where project.image contains the raw binary data.
3. Add the url to the img tag.
4. Problem: Not displaying the image as expected.
Preview:
I have spent many hours not knowing what is wrong here. Any help would be highly appreciated. Thanks!


