1.0.1 • Published 8 years ago
asset-library-to-base64 v1.0.1
React Native image asset-library:// uri to base 64
A React Native Module that converts an image's asset-library:// uri to base64:
Install
IOS
npm install --save react-native-ios-asset-library-to-base64
- Open your project in Xcode and copy
ios/RCTCustom.m
provided in this module toLibraries > React > Base
in xcode
Usage
- In your React Native javascript code, bring in the native module:
var ReadImageData = require('NativeModules').ReadImageData;
- convert image url:
// image asset-library:// uri ReadImageData.readImage(uri, (imageBase64) => { console.log(imageBase64); });
1.0.1
8 years ago