[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4170":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},4170,"react-native-image-picker","react-native-image-picker\u002Freact-native-image-picker",":sunrise_over_mountains: A React Native module that allows you to use native UI to select media from the device library or directly from the camera.","",null,"Java",8638,2084,106,301,0,6,40.96,"MIT License",false,"main",[22,23,24],"image-picker","picker","react-native","2026-06-12 02:00:59","# react-native-image-picker 🎆\n\nA React Native module that allows you to select a photo\u002Fvideo from the device library or camera.\n\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdw\u002Freact-native-image-picker)](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdw\u002Freact-native-image-picker)\n[![npm package](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Freact-native-image-picker?color=red)](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Freact-native-image-picker?color=red)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Freact-native-image-picker\u002Freact-native-image-picker?color=blue)](https:\u002F\u002Fgithub.com\u002Freact-native-image-picker\u002Freact-native-image-picker\u002Fblob\u002Fmain\u002FLICENSE.md)\n\n## Installation\n\n```bash\nyarn add react-native-image-picker\n```\n\n### New Architecture\n\nTo take advantage of the new architecture run-\n\n#### iOS\n\n```bash\nRCT_NEW_ARCH_ENABLED=1 npx pod-install ios\n```\n\n#### Android\n\nSet `newArchEnabled` to `true` inside `android\u002Fgradle.properties`\n\n### Pre-Fabric (AKA not using the new architecture)\n\n```bash\nnpx pod-install ios\n```\n\n## Post-install Steps\n\n### iOS\n\nAdd the appropriate keys to your `Info.plist` depending on your requirement:\n\n| Requirement                    | Key                                                     |\n| ------------------------------ | ------------------------------------------------------- |\n| Select image\u002Fvideo from photos | NSPhotoLibraryUsageDescription                          |\n| Capture Image                  | NSCameraUsageDescription                                |\n| Capture Video                  | NSCameraUsageDescription & NSMicrophoneUsageDescription |\n\n### Android\n\nNo permissions required (`saveToPhotos` requires permission [check](#note-on-file-storage)).\n\nNote: This library does not require `Manifest.permission.CAMERA`, if your app declares as using this permission in manifest then you have to obtain the permission before using `launchCamera`.\n\n#### Targeting Android API Levels Below 30\n\nIf your app's `minSdkVersion` is set to below 30 and it does not already include or depend on `androidx.activity:activity:1.9.+` or a newer version, you'll need to add the following line to the dependencies section of your `app\u002Fbuild.gradle` file to ensure support for the backported AndroidX Photo Picker:\n\n```groovy\ndependencies {\n    ...\n    implementation(\"androidx.activity:activity:1.9.+\")\n    ...\n}\n```\n\nAdditionally, you may need to update your `AndroidManifest.xml` to trigger the installation of the backported Photo Picker. For reference, you can check the example app's configuration in `example\u002Fandroid\u002Fapp\u002Fsrc\u002Fmain\u002FAndroidManifest.xml` and `example\u002Fandroid\u002Fapp\u002Fbuild.gradle`.\n\nFor more details, consult the Android documentation on AndroidX Photo Picker: [https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fdata-storage\u002Fshared\u002Fphotopicker](https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fdata-storage\u002Fshared\u002Fphotopicker)\n\n## API Reference\n\n## Methods\n\n```js\nimport {launchCamera, launchImageLibrary} from 'react-native-image-picker';\n```\n\n### `launchCamera()`\n\nLaunch camera to take photo or video.\n\n```js\nlaunchCamera(options?, callback);\n\n\u002F\u002F You can also use as a promise without 'callback':\nconst result = await launchCamera(options?);\n```\n\nSee [Options](#options) for further information on `options`.\n\nThe `callback` will be called with a response object, refer to [The Response Object](#the-response-object).\n\n### `launchImageLibrary`\n\nLaunch gallery to pick image or video.\n\n```js\nlaunchImageLibrary(options?, callback)\n\n\u002F\u002F You can also use as a promise without 'callback':\nconst result = await launchImageLibrary(options?);\n```\n\nSee [Options](#options) for further information on `options`.\n\nThe `callback` will be called with a response object, refer to [The Response Object](#the-response-object).\n\n## Options\n\n| Option                  | iOS | Android | Web | Description                                                                                                                                                                                                                                                                               |\n| ----------------------- | --- | ------- | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| mediaType               | OK  | OK      | OK  | `photo` or `video` or `mixed`(`launchCamera` on Android does not support 'mixed'). Web only supports 'photo' for now.                                                                                                                                                                     |\n| restrictMimeTypes       | NO  | OK      | NO  | Array containing the mime-types allowed to be picked. Default is empty (everything).                                                                                                                                                                                                      |\n| maxWidth                | OK  | OK      | NO  | To resize the image.                                                                                                                                                                                                                                                                      |\n| maxHeight               | OK  | OK      | NO  | To resize the image.                                                                                                                                                                                                                                                                      |\n| videoQuality            | OK  | OK      | NO  | `low`, `medium`, or `high` on iOS, `low` or `high` on Android.                                                                                                                                                                                                                            |\n| durationLimit           | OK  | OK      | NO  | Video max duration (in seconds).                                                                                                                                                                                                                                                          |\n| quality                 | OK  | OK      | NO  | 0 to 1, photos.                                                                                                                                                                                                                                                                           |\n| conversionQuality       | NO  | OK      | NO  | For conversion from HEIC\u002FHEIF to JPEG, 0 to 1. Default is `0.92`                                                                                                                                                                                                                          |\n| cameraType              | OK  | OK      | NO  | 'back' or 'front' (May not be supported in few android devices).                                                                                                                                                                                                                          |\n| includeBase64           | OK  | OK      | OK  | If `true`, creates base64 string of the image (Avoid using on large image files due to performance).                                                                                                                                                                                      |\n| includeExtra            | OK  | OK      | NO  | If `true`, will include extra data which requires library permissions to be requested (i.e. exif data).                                                                                                                                                                                   |\n| saveToPhotos            | OK  | OK      | NO  | (Boolean) Only for `launchCamera`, saves the image\u002Fvideo file captured to public photo.                                                                                                                                                                                                   |\n| selectionLimit          | OK  | OK      | OK  | Supports providing any integer value. Use `0` to allow any number of files on iOS version >= 14 & Android version >= 13. Default is `1`.                                                                                                                                                  |\n| presentationStyle       | OK  | NO      | NO  | Controls how the picker is presented. `currentContext`, `pageSheet`, `fullScreen`, `formSheet`, `popover`, `overFullScreen`, `overCurrentContext`. Default is `currentContext`.                                                                                                           |\n| formatAsMp4             | OK  | NO      | NO  | Converts the selected video to MP4 (iOS Only).                                                                                                                                                                                                                                            |\n| assetRepresentationMode | OK  | OK      | NO  | A mode that determines which representation to use if an asset contains more than one on iOS or disables HEIC\u002FHEIF to JPEG conversion on Android if set to 'current'. Possible values: 'auto', 'current', 'compatible'. Default is 'auto'.                                                |\n| androidCameraPackage    | NO  | OK      | NO  | The package name of the camera app to use on Android. If not provided, the default camera app will be used. Only applicable when `mediaType` is set to `photo`. Not supported for video capture. **If the specified app is not installed on the device, the camera will fail to launch.** |\n\n## The Response Object\n\n| key          | iOS | Android | Web | Description                                                         |\n| ------------ | --- | ------- | --- | ------------------------------------------------------------------- |\n| didCancel    | OK  | OK      | OK  | `true` if the user cancelled the process                            |\n| errorCode    | OK  | OK      | OK  | Check [ErrorCode](#ErrorCode) for all error codes                   |\n| errorMessage | OK  | OK      | OK  | Description of the error, use it for debug purpose only             |\n| assets       | OK  | OK      | OK  | Array of the selected media, [refer to Asset Object](#Asset-Object) |\n\n## Asset Object\n\n| key          | iOS | Android | Web | Photo\u002FVideo | Requires Permissions | Description                                                                                                                                                                                                                                                                    |\n| ------------ | --- | ------- | --- | ----------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| base64       | OK  | OK      | OK  | PHOTO ONLY  | NO                   | The base64 string of the image (photos only)                                                                                                                                                                                                                                   |\n| uri          | OK  | OK      | OK  | BOTH        | NO                   | The file uri in app specific cache storage. Except when picking **video from Android gallery** where you will get read only content uri, to get file uri in this case copy the file to app specific storage using any react-native library. For web it uses the base64 as uri. |\n| originalPath | NO  | OK      | NO  | BOTH        | NO                   | The original file path.                                                                                                                                                                                                                                                        |\n| width        | OK  | OK      | OK  | BOTH        | NO                   | Asset dimensions                                                                                                                                                                                                                                                               |\n| height       | OK  | OK      | OK  | BOTH        | NO                   | Asset dimensions                                                                                                                                                                                                                                                               |\n| fileSize     | OK  | OK      | NO  | BOTH        | NO                   | The file size                                                                                                                                                                                                                                                                  |\n| type         | OK  | OK      | NO  | BOTH        | NO                   | The file type                                                                                                                                                                                                                                                                  |\n| fileName     | OK  | OK      | NO  | BOTH        | NO                   | The file name                                                                                                                                                                                                                                                                  |\n| duration     | OK  | OK      | NO  | VIDEO ONLY  | NO                   | The selected video duration in seconds                                                                                                                                                                                                                                         |\n| bitrate      | --- | OK      | NO  | VIDEO ONLY  | NO                   | The average bitrate (in bits\u002Fsec) of the selected video, if available. (Android only)                                                                                                                                                                                          |\n| timestamp    | OK  | OK      | NO  | BOTH        | YES                  | Timestamp of the asset. Only included if 'includeExtra' is true                                                                                                                                                                                                                |\n| id           | OK  | OK      | NO  | BOTH        | YES                  | local identifier of the photo or video. On Android, this is the same as fileName                                                                                                                                                                                               |\n\n## Note on file storage\n\nImage\u002Fvideo captured via camera will be stored in temporary folder allowing it to be deleted any time, so don't expect it to persist. Use `saveToPhotos: true` (default is `false`) to save the file in the public photos. `saveToPhotos` requires `WRITE_EXTERNAL_STORAGE` permission on Android 28 and below (The permission has to obtained by the App manually as the library does not handle that).\n\nFor web, this doesn't work.\n\n## ErrorCode\n\n| Code               | Description                                       |\n| ------------------ | ------------------------------------------------- |\n| camera_unavailable | Camera not available on device                    |\n| permission         | Permission not satisfied                          |\n| others             | Other errors (check errorMessage for description) |\n\n## License\n\n[MIT](LICENSE.md)\n","react-native-image-picker 是一个 React Native 模块，允许用户通过原生UI从设备相册或直接使用相机选择照片或视频。其核心功能包括调用设备摄像头拍摄新照片或视频，以及从相册中选取现有媒体文件。该模块支持iOS和Android平台，并且在iOS上需要添加相应的权限描述到Info.plist文件中，而Android则无需额外权限（除非将图片保存到相册）。此项目非常适合需要集成媒体选择功能的React Native应用开发场景，如社交软件、内容分享平台等。采用MIT许可证发布，表明了其开源性质，便于开发者自由使用与贡献。",2,"2026-06-11 02:58:49","top_language"]