Yet another binary buffer to base64 image converter.
https://github.com/IamLizu/image-buffer.git
npm i @iamlizu/image-buffer and import the package.
``
import imageBuffer from "@iamlizu/image-buffer";
`
imageBuffer method takes two input, first one is the binary buffer and the second one is the content-type of the image.
`
<img
...
// Feeding imageBuffer the information it needs to get a base64 image string.
src={imageBuffer(image.data, image.contentType)}
...
/>
``