@vietkidz/react-native-image-base64

0.1.2 • Public • Published

react-native-image-base64

This repo is a working rewrite of this abandonned library. It provides a very simple way to convert an image to a base64 string.

If you encounter OOM errors on old android devices, make sure you optimize the image's size before you convert it. Indeed working with big images on Android might cause very high memory usage.

Getting started

npm install react-native-image-base64 --save or yarn add react-native-image-base64

Installation

$ react-native link react-native-image-base64

Usage

import ImgToBase64 from 'react-native-image-base64';

ImgToBase64.getBase64String('file://youfileurl')
  .then(base64String => doSomethingWith(base64String))
  .catch(err => doSomethingWith(err));

Readme

Keywords

Package Sidebar

Install

npm i @vietkidz/react-native-image-base64

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

15.2 kB

Total Files

13

Last publish

Collaborators

  • truongtv22