{"id":4216,"url":"https://github.com/gxsshallot/react-native-full-image-picker","last_synced_at":"2025-04-09T23:03:58.547Z","repository":{"id":57115515,"uuid":"140536231","full_name":"gxsshallot/react-native-full-image-picker","owner":"gxsshallot","description":"Support taking photo, video recording or selecting from photo library.","archived":false,"fork":false,"pushed_at":"2019-05-09T09:24:02.000Z","size":2362,"stargazers_count":83,"open_issues_count":10,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-01T03:35:41.795Z","etag":null,"topics":["photo-library","react-native","take-picture","video-recording"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gxsshallot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-11T07:12:44.000Z","updated_at":"2024-07-02T10:32:34.000Z","dependencies_parsed_at":"2022-08-22T14:00:20.570Z","dependency_job_id":null,"html_url":"https://github.com/gxsshallot/react-native-full-image-picker","commit_stats":null,"previous_names":["gaoxiaosong/react-native-full-image-picker"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxsshallot%2Freact-native-full-image-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxsshallot%2Freact-native-full-image-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxsshallot%2Freact-native-full-image-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxsshallot%2Freact-native-full-image-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gxsshallot","download_url":"https://codeload.github.com/gxsshallot/react-native-full-image-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226114521,"owners_count":17575650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["photo-library","react-native","take-picture","video-recording"],"created_at":"2024-01-05T20:17:04.779Z","updated_at":"2024-11-24T01:21:26.883Z","avatar_url":"https://github.com/gxsshallot.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# react-native-full-image-picker\n\n[![npm version](https://img.shields.io/npm/v/react-native-full-image-picker.svg?style=flat)](https://www.npmjs.com/package/react-native-full-image-picker)\n[![Build Status](https://travis-ci.org/gaoxiaosong/react-native-full-image-picker.svg?branch=master)](https://travis-ci.org/gaoxiaosong/react-native-full-image-picker)\n\n[中文说明](https://www.jianshu.com/p/4f7296753013)\n\nIt is a react native UI component including a camera view and an album selection view. You can take photos, take video recording or select photo from photo library.\n\nIt supports:\n\n* Take photos by camera.\n* Video recording.\n* Select photos from photo library.\n* Safe area for iPhone X.\n* Portrait and Landscape mode.\n* Multiple selection or capture mode.\n* Preview after capture or video recording.\n* Maximum count of photos.\n\n## ScreenShots\n\n\u003cp float=\"left\"\u003e\n\n\u003cimg src=\"/resource/camera.gif\" width=\"25%\"\u003e\n\n\u003cimg src=\"/resource/album.gif\" width=\"25%\"\u003e\n\n\u003c/p\u003e\n\nSame UI on Android.\n\n## Install\n\nInstall by Yarn:\n\n```shell\nyarn add react-native-full-image-picker\n```\n\nInstall by NPM:\n\n```shell\nnpm install --save react-native-full-image-picker\n```\n\n**NOTICE**: This library has no native code for iOS and Android. But you should also install native code of these libraries:\n\n* [CameraRoll](https://facebook.github.io/react-native/docs/cameraroll): Used to get all photos in camera roll or photo library.\n* [react-native-camera](https://github.com/react-native-community/react-native-camera): Used to show camera in view.\n* [react-native-video](https://github.com/react-native-community/react-native-video): Used to preview the video.\n* [react-native-fs](https://github.com/itinance/react-native-fs): Used to copy generated photo or video to a temporary place.\n\n## Usage\n\nFirst import in the file:\n\n```jsx\nimport * as ImagePicker from 'react-native-full-image-picker';\n```\n\nIt has three method:\n\n* `ImagePicker.getCamera(options)`: Take photo from camera. (Camera Mode)\n* `ImagePicker.getVideo(options)`: Video recording. (Video Mode)\n* `ImagePicker.getAlbum(options)`: Select photo or video from photo library. (Photo Mode)\n\n`options` is a object with these settings:\n\n* `callback: (data: any[]) =\u003e void`: Callback method with photo or video array. `data` is an uri array of photo or video. Do not use `Alert` in this callback method.\n* `maxSize?: number`: The maximum number of photo count. Valid in camera or photo library mode.\n* `sideType?: RNCamera.Constants.Type`: Side of camera, back or front. Valid in camera or video.\n* `pictureOptions?: RNCamera.PictureOptions`: The options of RNCamera.takePictureAsync(PictureOptions)\n* `recordingOptions?: RNCamera.RecordingOptions`: The options of RNCamera.recordAsync(RecordingOptions)\n* `flashMode?: RNCamera.Constants.FlashMode`: Flash mode. Valid in camera or video.\n\nYou can use [react-native-general-actionsheet](https://github.com/gaoxiaosong/react-native-general-actionsheet) to show `ActionSheet` by same API and UI with `ActionSheetIOS`.\n\n## Change Default Property\n\nYou can import page and change `defaultProps` to modify settings globally:\n\n```jsx\nimport * as ImagePicker from 'react-native-full-image-picker';\n\nImagePicker.XXX.defaultProps.yyy = ...;\n```\n\nThe `XXX` is the export items of library. Following is the detail.\n\n### PhotoModalPage\n\nThis is the outter navigator for all modes. You can change these properties of `defaultProps`:\n\n| Name | Type | Description |\n| :-: | :-: | :- |\n| okLabel | string | OK button text |\n| cancelLabel | string | Cancel button text |\n| deleteLabel | string | Delete button text\n| useVideoLabel | string | UseVideo button text |\n| usePhotoLabel | string | UsePhoto button text |\n| previewLabel | string | Preview button text |\n| choosePhotoTitle | string | ChoosePhoto page title |\n| maxSizeChooseAlert | (num: number) =\u003e string | Max size limit alert message when choosing photos |\n| maxSizeTakeAlert | (num: number) =\u003e string | Max size limit alert message when taking photos from camera |\n| supportedOrientations | string[] | Supported orientations. Default is landscape and portrait |\n\n### CameraView\n\nThis is page for taking photos from camera or recording video. You can change these properties of `defaultProps`:\n\n| Name | Type | Description |\n| :-: | :-: | :- |\n| maxSize | number | Default max number limit |\n| sideType | RNCamera.Constants.Type | Camera side type. Default is `back` |\n| flashMode | RNCamera.Constants.FlashMode | Flash mode. Default is `off` |\n\n### AlbumListView\n\nThis is page for selecting photo from photo library. You can change these properties of `defaultProps`:\n\n| Name | Type | Description |\n| :-: | :-: | :- |\n| maxSize | number | Default max number limit |\n| autoConvertPath | boolean | Auto copy photo or not to convert file path to standard file path. Default is `false` |\n| assetType | string | Asset type. Please see [CameraRoll Docs](https://facebook.github.io/react-native/docs/cameraroll) |\n| groupTypes | string | Group type. Please see [CameraRoll Docs](https://facebook.github.io/react-native/docs/cameraroll) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgxsshallot%2Freact-native-full-image-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgxsshallot%2Freact-native-full-image-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgxsshallot%2Freact-native-full-image-picker/lists"}