# react-native-convert-image-to-base64

> Convert image to base64

Latest version **0.1.0** (published 2018-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-convert-image-to-base64
pnpm add react-native-convert-image-to-base64
yarn add react-native-convert-image-to-base64
bun add react-native-convert-image-to-base64
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-01-24 |
| First published | 2018-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Snapp |
| Maintainers | mvilleneuve |
| Keywords | react-native, base64 |

## Links

- npm: https://www.npmjs.com/package/react-native-convert-image-to-base64
- npm.io page: https://npm.io/package/react-native-convert-image-to-base64

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-01-24

## README

# react-native-img-to-base64

This repo is a working rewrite of [this](https://github.com/xfumihiro/react-native-image-to-base64) 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
```javascript
import ImgToBase64 from 'react-native-image-base64';

ImgToBase64.getBase64String('file://youfileurl', (err, base64string) => doSomethingWith(base64string));
```

---
_Source: https://npm.io/package/react-native-convert-image-to-base64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
