๐Ÿ“ฆ IamLizu / image-buffer

Yet another binary buffer to base64 image converter.

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching
base64buffermongodbreactjs
๐Ÿ“ฅ Clone https://github.com/IamLizu/image-buffer.git
HTTPS git clone https://github.com/IamLizu/image-buffer.git
SSH git clone git@github.com:IamLizu/image-buffer.git
CLI gh repo clone IamLizu/image-buffer
IamLizu IamLizu update usage example 869230a 4 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“„ index.js
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md

image-buffer

Converts binary buffer into base64 image. Usually helpful displaying images from the database (saved as buffer) in your front-end applications.

Usage

At first, install it from npm with 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)} ... /> ``

Contributing

Fork the repository at GitHub, create a new branch, make your improvements, and finally submit a pull request.