convert-base64-to-image
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

Convert Base64 to Image

Demo

Check out the demo which uses an Express server Demo

Installation

Using npm:

$ npm i convert-base64-to-image

Using yarn:

$ yarn add convert-base64-to-image

General usage:

import { converBase64ToImage } from 'convert-base64-to-image'

const base64 = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//'
const pathToSaveImage = './public/image.png'

const path = converBase64ToImage(base64, pathToSaveImage) //returns path /public/image.png 

Why use this package?

It allows you to upload files using the base64 string created by FileReader into your server.

Package Sidebar

Install

npm i convert-base64-to-image

Weekly Downloads

397

Version

0.0.16

License

MIT

Unpacked Size

6.16 kB

Total Files

6

Last publish

Collaborators

  • kazion