Socket
Book a DemoInstallSign in
Socket

convert-base64-to-image

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-base64-to-image

This is a node package that helps you to convert base64 string created by javascript file reader to image downloadable file

0.0.16
latest
npmnpm
Version published
Weekly downloads
365
13.71%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

base64

FAQs

Package last updated on 16 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.