
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
react-native-image-editor-next
Advanced tools
React Native Image Editing native modules for iOS & Android
Image Editor Native module for React Native.
yarn add react-native-image-editor-next
or
npm install react-native-image-editor-next --save
npx pod-install
Start by importing the library:
import ImageEditor from "react-native-image-editor-next";
Crop the image specified by the URI param. If URI points to a remote image, it will be downloaded automatically. If the image cannot be loaded/downloaded, the promise will be rejected.
If the cropping process is successful, the resultant cropped image will be stored in the cache path, and the URI returned in the promise will point to the image in the cache path. Remember to delete the cropped image from the cache path when you are done with it.
ImageEditor.cropImage(uri, cropData).then(url => {
console.log("Cropped image uri", url);
})
Property | Required | Description |
---|---|---|
offset | Yes | The top-left corner of the cropped image, specified in the original image's coordinate space |
size | Yes | Size (dimensions) of the cropped image |
displaySize | No | Size to which you want to scale the cropped image |
resizeMode | No | Resizing mode to use when scaling the image (iOS only, android resize mode is always 'cover') Default value: 'contain' |
cropData = {
offset: {x: number, y: number},
size: {width: number, height: number},
displaySize: {width: number, height: number},
resizeMode: 'contain' | 'cover' | 'stretch',
};
For more advanced usage check our example app.
FAQs
React Native Image Editing native modules for iOS & Android
The npm package react-native-image-editor-next receives a total of 15 weekly downloads. As such, react-native-image-editor-next popularity was classified as not popular.
We found that react-native-image-editor-next demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.