Gathering detailed insights and metrics for react-native-avatar-crop
Gathering detailed insights and metrics for react-native-avatar-crop
Gathering detailed insights and metrics for react-native-avatar-crop
Gathering detailed insights and metrics for react-native-avatar-crop
@cshancock/react-native-avatar-crop
Crop component to crop profile images
@ricardo-alan/react-native-avatar-crop
Crop component to crop profile images
react-native-avatar-crop-fork-oneclick
Crop component to crop profile images
react-native-image-cropper-jamia
## Result <div align="left"> <a href="https://github.com/thanhit93/react-native-image-cropper-thanhtq/tree/master/images/image-ios-crop.jpg"> <img title="iOs crop avatar" src="/images/image-ios-crop.jpg" width=200 /> </a> <a href="https://github.com/
Highly customisable <Crop /> component for React Native < 💅 >
npm install react-native-avatar-crop
Typescript
Module System
Node Version
NPM Version
chores
Updated on Jan 10, 2022
v1.3.4
Updated on Jan 09, 2022
Fixes dependencies v1.3.0, v1.3.1, v1.3.2, v1.3.3
Updated on Dec 13, 2021
fixes floating point division
Updated on Nov 03, 2021
Fixes npm@7 issue and image not panning issue
Updated on Aug 24, 2021
⚠️ Not working as expected, apart from what is shown in the demo
Updated on Aug 06, 2021
TypeScript (61.87%)
Java (16.53%)
Objective-C (11.46%)
Starlark (4.87%)
JavaScript (3.25%)
Ruby (2.02%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
55 Stars
40 Commits
18 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Feb 11, 2025
Latest Version
1.3.5
Package Id
react-native-avatar-crop@1.3.5
Unpacked Size
72.48 kB
Size
20.43 kB
File Count
17
NPM Version
7.21.0
Node Version
14.17.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
Supports rect and circle cropping. Use cropArea={{width, height}}
for custom aspect ratio.
Download apk to see it in action, click to download
Image Picker | Network Image |
---|---|
![]() | ![]() |
Note: Please migrate to @react-native-masked-view/masked-view if using @react-native-community/masked-view
npm
npm install react-native-avatar-crop vemarav/react-native-image-editor react-native-image-size @react-native-masked-view/masked-view @react-native-gesture-handler --save
yarn
yarn add react-native-avatar-crop vemarav/react-native-image-editor react-native-image-size @react-native-masked-view/masked-view @react-native-gesture-handler
1const component = (props) => { 2 const { uri, setUri } = useState(""); 3 let crop; 4 const { width: SCREEN_WIDTH } = Dimensions.get("window"); 5 6 const cropImage = async () => { 7 // crop accepts quality, default is 1 8 // uri will have cropped image cache path 9 const { uri, width, height } = await crop(0.9); 10 setUri(uri); 11 }; 12 13 return ( 14 <View> 15 {uri ? ( 16 <Image 17 source={{ uri }} 18 style={{ 19 width: SCREEN_WIDTH, 20 height: SCREEN_WIDTH, 21 resizeMode: "contain", 22 }} 23 /> 24 ) : null} 25 <Crop 26 source={props.uri} 27 cropShape={"circle"} // rect || circle 28 width={SCREEN_WIDTH} // default value 29 height={SCREEN_WIDTH} // defalt value 30 cropArea={{ 31 width: SCREEN_WIDTH / 1.3, // required 32 height: SCREEN_WIDTH / 1.3, // required 33 }} 34 borderWidth={0} // default 2 35 backgroundColor={"#FFFFFF"} // default #FFFFFF, use same format 36 opacity={0.7} // between 0 and 1, default is 1 37 maxZoom={3} // default 3 38 resizeMode={"contain"} // default "cover" 39 onCrop={(cropCallback) => (crop = cropCallback)} // returns a function 40 /> 41 </View> 42 ); 43};
see full example here
Whether you are a novice or experienced software developer, all contributions and suggestions are welcome!
Clone repo
git clone https://github.com/vemarav/react-native-avatar-crop.git
Add features or bug fixes
Make a Pull Request
OR
Report a bug here
Feel free to contribute, hosted on ❤️ with Github.
Package published under MIT License
Please use following button to star the, so it can reach others too
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
35 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More