React Native Expo Image Cropper
iOS and Android
Open on your device!Install Dependences
- yarn add react-native-expo-image-cropper
Example
Component state = showModal: false uri: 'https://media.sproutsocial.com/uploads/2017/02/10x-featured-social-media-image-size.png' { const showModal = thisstate this } { const uri showModal = thisstate const width height = Dimensions return <ImageBackground resizeMode="contain" style= justifyContent: 'center' padding: 20 alignItems: 'center' height width backgroundColor: 'black' source= uri > <TouchableOpacity title="Open Image Editor" onPress= this /> <ExpoImageManipulator photo= uri isVisible=showModal onPictureChoosed= { this } onToggleModal= this saveOptions= compress: 1 format: 'png' base64: true /> </ImageBackground> }
Run the example!
- Clone this repository
- cd example/
- run yarn or npm install
- enjoy!
Requirements
- Use it into Expo app (from expo client, Standalone app or ExpoKit app).
- Because we need to have access to
Expo.ImageManipulator
- Only Expo SDK 33 or Higher
Features
- Crop and rotate image with
Expo.ImageManipulator