{"id":22165266,"url":"https://github.com/doochik/react-native-imagepicker","last_synced_at":"2025-10-17T16:02:31.313Z","repository":{"id":57337652,"uuid":"47059094","full_name":"doochik/react-native-imagepicker","owner":"doochik","description":" A React Native module which wraps ActionSheetIOS, CameraRoll and ImagePickerIOS to select a photo from the library or camera","archived":false,"fork":false,"pushed_at":"2017-09-25T19:42:48.000Z","size":11,"stargazers_count":19,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T22:42:40.777Z","etag":null,"topics":[],"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/doochik.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":"2015-11-29T10:27:58.000Z","updated_at":"2024-09-02T16:23:52.000Z","dependencies_parsed_at":"2022-08-29T21:11:20.591Z","dependency_job_id":null,"html_url":"https://github.com/doochik/react-native-imagepicker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2Freact-native-imagepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2Freact-native-imagepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2Freact-native-imagepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2Freact-native-imagepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doochik","download_url":"https://codeload.github.com/doochik/react-native-imagepicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227673984,"owners_count":17802303,"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":[],"created_at":"2024-12-02T05:14:18.352Z","updated_at":"2025-10-17T16:02:26.293Z","avatar_url":"https://github.com/doochik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-imagepicker\n\nA React Native module which wraps [ActionSheetIOS](https://facebook.github.io/react-native/docs/actionsheetios.html),\n [CameraRoll](https://facebook.github.io/react-native/docs/cameraroll.html) and\n [ImagePickerIOS](https://facebook.github.io/react-native/docs/imagepickerios.html)\n to select a photo from the PhotoLibrary or CameraRoll. No external plugins needed.\n \n## Setup\n\n1. `npm install --save react-native-imagepicker` \n2. [Setup CameraRoll](http://facebook.github.io/react-native/releases/docs/cameraroll.html)\n\n## Usage\n\nBasics\n\n```js\nconst imagePicker = require('react-native-imagepicker');\nimagePicker.open({\n    takePhoto: true,\n    useLastPhoto: true,\n    chooseFromLibrary: true\n}).then(({ uri, width, height }) =\u003e {\n    console.log('image asset', uri, width, height);\n}, (error) =\u003e {\n    // Typically, user cancel  \n    console.log('error', error);\n});\n\n```\n \nEach button (`takePhoto`, `useLastPhoto`, `chooseFromLibrary`) can be configure in following way\n\n```js\nimagePicker.open({\n    cancelTitle: 'Your custom title',\n    takePhoto: {\n        title: 'Your custom title',\n        config: { /* Config object to ImagePickerIOS.openCameraDialog() */ }\n    },\n    useLastPhoto: {\n        title: 'Your custom title',\n        config: { /* Config object to CameraRoll.getPhotos() */ }\n    },\n    chooseFromLibrary: {\n        title: 'Your custom title',\n        config: { /* Config object to ImagePickerIOS.openSelectDialog() */ }\n    },\n    ...\n})\n```\n\nAlso you can disable some of buttons\n\n```js\nconst imagePicker = require('react-native-imagepicker');\n\nimagePicker.open({\n    takePhoto: 'Custom title',  // Shorthand for custom title\n    useLastPhoto: false, // disable this button\n    chooseFromLibrary: true // get default values\n})\n```\n\n## `uri` usage\n\n`uri` can be directly passed to `\u003cImage/\u003e` or `FormData`\n\n```js\n...\nrender() {\n    \u003cImage source={{ uri: uri, isStatic: true }}/\u003e\n} \n...\n```\n\n```js\nconst fd = new FormData();\nfd.append('photo', {\n    uri: uri,\n    type: 'image/jpeg',\n    name: 'photo.jpg'\n});\n```\n\n## Known bugs\n\n1. ImagePickerIOS take photo with wrong orientation [#12249](https://github.com/facebook/react-native/pull/12249).\n Fixed in RN \u003e= 0.48.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoochik%2Freact-native-imagepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoochik%2Freact-native-imagepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoochik%2Freact-native-imagepicker/lists"}