{"id":25201367,"url":"https://github.com/ftzi/expo-image-picker-hook","last_synced_at":"2025-04-04T20:18:23.804Z","repository":{"id":37989266,"uuid":"502531391","full_name":"ftzi/expo-image-picker-hook","owner":"ftzi","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-12T21:37:25.000Z","size":1228,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T13:08:24.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ftzi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-06-12T05:53:33.000Z","updated_at":"2023-01-19T00:55:25.000Z","dependencies_parsed_at":"2022-09-06T19:50:28.166Z","dependency_job_id":null,"html_url":"https://github.com/ftzi/expo-image-picker-hook","commit_stats":null,"previous_names":["hfantauzzi/expo-image-picker-hook","brfantauzzi/expo-image-picker-hook","ftzi/expo-image-picker-hook","srbrahma/expo-image-picker-hook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftzi%2Fexpo-image-picker-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftzi%2Fexpo-image-picker-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftzi%2Fexpo-image-picker-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftzi%2Fexpo-image-picker-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftzi","download_url":"https://codeload.github.com/ftzi/expo-image-picker-hook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242688,"owners_count":20907135,"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":"2025-02-10T04:44:05.720Z","updated_at":"2025-04-04T20:18:23.781Z","avatar_url":"https://github.com/ftzi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- \u003cimg src=\".logo.png\" alt=expo-image-picker-hook/\u003e\u003cbr/\u003e --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm](https://img.shields.io/npm/v/expo-image-picker-hook)](https://www.npmjs.com/package/expo-image-picker-hook)\n[![TypeScript](https://badgen.net/npm/types/env-var)](http://www.typescriptlang.org/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\u003c!-- [![npm](https://img.shields.io/npm/dm/expo-image-picker-hook)](https://www.npmjs.com/package/expo-image-picker-hook) --\u003e\n\u003c/div\u003e\n\n# expo-image-picker-hook\n\nConvenient hook for `expo-image-picker`.\n\nSupports `blob` and `base64`.\n\n## 💿 Installation\n```bash\nexpo install expo-image-picker-hook expo-image-picker\n```\n\n## 📖 Usage\n\n```tsx\nfunction MyComponent() {\n  const ImagePicker = useImagePicker({\n    aspect: [2, 1],\n    quality: 0.9,\n    permissionNotGrantedText: 'You need to give the app permission to select the image.',\n  })\n\n  const pick = () =\u003e {\n    ImagePicker.pick()\n      .catch(err =\u003e Alert.alert('Error', err.message))\n  }\n\n  const upload = () =\u003e {\n    ImagePicker.upload({ fun: (image) =\u003e myApi.uploadImage(image) }, { mode: 'base64' })\n      .catch(err =\u003e Alert.alert('Error', err.message))\n  }\n\n  return (\n    \u003cView\u003e\n      \u003cImage source={{ uri: ImagePicker.uri }}\u003e\n      \u003cButton onPress={pick}\u003e\n      \u003cButton onPress={upload} disabled={!ImagePicker.isPicked}\u003e\n    \u003c/View\u003e\n  )\n}\n```\n\n## 📰 [Changelog](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftzi%2Fexpo-image-picker-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftzi%2Fexpo-image-picker-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftzi%2Fexpo-image-picker-hook/lists"}