{"id":43687798,"url":"https://github.com/NativeScript/nativescript-imagepicker","last_synced_at":"2026-02-16T13:01:50.805Z","repository":{"id":36292955,"uuid":"40597488","full_name":"NativeScript/nativescript-imagepicker","owner":"NativeScript","description":"Imagepicker plugin supporting both single and multiple selection. ","archived":false,"fork":false,"pushed_at":"2021-04-13T05:10:42.000Z","size":6872,"stargazers_count":106,"open_issues_count":25,"forks_count":73,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-10-09T06:24:53.296Z","etag":null,"topics":["android","imagepicker","ios","mobile","nativescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-12T11:39:29.000Z","updated_at":"2025-10-05T15:04:57.000Z","dependencies_parsed_at":"2022-08-29T15:52:18.727Z","dependency_job_id":null,"html_url":"https://github.com/NativeScript/nativescript-imagepicker","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/NativeScript/nativescript-imagepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-imagepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-imagepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-imagepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-imagepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/nativescript-imagepicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-imagepicker/sbom","scorecard":{"id":99274,"data":{"date":"2025-08-11","repo":{"name":"github.com/NativeScript/nativescript-imagepicker","commit":"82a8c1b6fde08111c1d4f169e291a07773331c56"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":8,"reason":"Found 15/18 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: npmCommand not pinned by hash: publish/pack.sh:11","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/NativeScript/.github/SECURITY.md:1","Info: Found linked content: github.com/NativeScript/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/NativeScript/.github/SECURITY.md:1","Info: Found text in security policy: github.com/NativeScript/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T09:47:37.275Z","repository_id":36292955,"created_at":"2025-08-15T09:47:37.275Z","updated_at":"2025-08-15T09:47:37.275Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29508735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","imagepicker","ios","mobile","nativescript"],"created_at":"2026-02-05T03:00:21.768Z","updated_at":"2026-02-16T13:01:50.800Z","avatar_url":"https://github.com/NativeScript.png","language":"TypeScript","readme":"## NativeScript 7 or higher\n\n* Use `@nativescript/imagepicker`: `~1.0.0`\n* [Source managed here](https://github.com/NativeScript/plugins)\n\n## If using 6 and below, see the following:\n\n# NativeScript Image Picker ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png) \n\n\n[![npm](https://img.shields.io/npm/v/nativescript-imagepicker.svg)](https://www.npmjs.com/package/nativescript-imagepicker)\n[![npm](https://img.shields.io/npm/dm/nativescript-imagepicker.svg)](https://www.npmjs.com/package/nativescript-imagepicker)\n[![Build Status](https://travis-ci.org/NativeScript/nativescript-imagepicker.svg?branch=master)](https://travis-ci.org/NativeScript/nativescript-imagepicker)\n\nImagepicker plugin supporting both single and multiple selection.\n\u003cbr /\u003ePlugin supports **iOS8+** and uses [QBImagePicker](https://github.com/questbeat/QBImagePicker) cocoa pod.\n\u003cbr /\u003eFor **Android** it uses Intents to open the stock images or file pickers. For Android 6 (API 23) and above the permissions to read file storage should be explicitly required. See demo for implementation details.\n\n\u003c!-- TOC depthFrom:2 --\u003e\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Migrating from 5.x.x to 6.x.x](#migrating-from-5xx-to-6xx)\n- [Migrating from 4.x.x to 5.x.x](#migrating-from-4xx-to-5xx)\n- [Migrating from 3.x.x to 4.x.x](#migrating-from-3xx-to-4xx)\n- [Usage](#usage)\n    - [Import the plugin](#import-the-plugin)\n    - [Create imagepicker](#create-imagepicker)\n    - [Request permissions, show the images list and process the selection](#request-permissions-show-the-images-list-and-process-the-selection)\n- [API](#api)\n    - [Methods](#methods)\n- [Contribute](#contribute)\n- [Get Help](#get-help)\n\n\u003c!-- /TOC --\u003e\n\n\n## Installation\n\nIn Command prompt / Terminal navigate to your application root folder and run:\n\n```\ntns plugin add nativescript-imagepicker\ntns run\n```\n\n## Configuration\nNo additional configuration required!\n\n## Migrating from 5.x.x to 6.x.x\nWith version **6.x.x** the dependency to the `nativescript-ui-listview` plugin is removed and for iOS the [QBImagePicker](https://github.com/questbeat/QBImagePicker) cocoa pod is used. Now the plugin supports some new features, fixes some bugs and has a more native look in iOS. You should remove any dependencies to `nativescript-pro-ui`, `nativescript-ui-listview`, etc. in case you've added them in your app specifically for this plugin. Also the options **fileUri**, **doneText**, **cancelText**, **albumsText**, **newestFirst** and the methods **cancel()** and **done()** are no longer applicable. The image picker now returns the basic [{N} ImageAsset class](https://github.com/NativeScript/NativeScript/tree/master/tns-core-modules/image-asset) (and not custom asset as before). If you have been using the `fileUri` property of the returned assets to get a file path in versions prior to 6.x.x, you should refer to the following issue comment for an alternative way to get the path - https://github.com/NativeScript/nativescript-imagepicker/issues/181#issuecomment-384585293.\n\n## Migrating from 4.x.x to 5.x.x\nWith version **5.x.x** major update to the plugin there is a related dependency which needs to be updated inside your project. The plugin uses internally the `nativescript-ui-listview` plugin (part of the NativeScript Pro UI components). Recently the monolithic [NativeScript Pro UI plugin was split in multiple plugins](https://www.nativescript.org/blog/professional-components-from-nativescript-ui-the-big-breakup), each of them representing a single component. Now, instead of the monolithic package, nativescript-imagepicker uses only the component it needs. To use version 5.x.x of the plugin, you need to update any dependencies to `nativescript-pro-ui` in your project with the single component alternatives as described in the [migration guide](http://docs.telerik.com/devtools/nativescript-ui/migration).\n\n## Migrating from 3.x.x to 4.x.x\nWith the **4.x.x** major update to the plugin there is a related dependency which needs to be updated inside your project. The plugin uses internally the `nativescript-pro-ui` plugin (previously known as `nativescript-telerik-ui`) which has bee updated and made 100% free. This means that if your project is using the deprecated `nativescript-telerik-ui`/`pro` plugins adding the latest version of the `nativescript-imagepicker` plugin will cause your project to throw an build error when working with iOS. This is because the `nativescript-imagepicker` has a dependency to the new `nativescript-pro-ui` plugin and when your project also depends on the old `nativescript-telerik-ui` plugin there is a native frameworks collision.\n\nIn order to solve this you simply have to update to the latest `nativescript-pro-ui`, more details on how to migrate from `nativescript-telerik-ui`/`pro` to `nativescript-pro-ui` can be found [here](http://docs.telerik.com/devtools/nativescript-ui/migration).\n\n## Usage \n\nThe best way to explore the usage of the plugin is to inspect both demo apps in the plugin repository. \nIn `demo` folder you can find the usage of the plugin for TypeScript non-Angular application. Refer to `demo/app/main-page.ts`.\nIn `demo-angular` is the usage in an Angular app. Refer to `demo-angular/app/app.component.ts`.\n\nIn addition to the plugin usage, both apps are webpack configured.\n\nIn short here are the steps:\n\n### Import the plugin\n\n*TypeScript*\n``` \nimport * as imagepicker from \"nativescript-imagepicker\";\n```\n\n*Javascript*\n``` \nvar imagepicker = require(\"nativescript-imagepicker\");\n```\n\n### Create imagepicker\n\nCreate imagepicker in `single` or `multiple` mode to specifiy if the imagepicker will be used for single or multiple selection of images\n\n*TypeScript*\n``` \nlet context = imagepicker.create({\n    mode: \"single\" // use \"multiple\" for multiple selection\n});\n````\n\n*Javascript*\n````\nvar context = imagepicker.create({ mode: \"single\" }); // use \"multiple\" for multiple selection\n````\n\n### Request permissions, show the images list and process the selection\n\n``` \ncontext\n    .authorize()\n    .then(function() {\n        return context.present();\n    })\n    .then(function(selection) {\n        selection.forEach(function(selected) {\n            // process the selected image\n        });\n        list.items = selection;\n    }).catch(function (e) {\n        // process error\n    });\n```\n\n\u003e **NOTE**: To request permissions for Android 6+ (API 23+) we use [nativescript-permissions](https://www.npmjs.com/package/nativescript-permissions).\n\n\u003e **NOTE**: To be sure to have permissions add the following lines in AndroidManifest.xml\n```\n\u003cmanifest ... \u003e\n  \u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/\u003e\n\n  \u003capplication android:requestLegacyExternalStorage=\"true\" ... \u003e\n    ...\n  \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\n\n\u003e **NOTE**: Using the plugin on iOS requres photo library permission. Your app might be rejected from the Apple App Store if you do not provide a description about why you need this permission. The default message \"Requires access to photo library.\" might not be enough for the App Store reviewers. You can customize it by editing the `app/App_Resources/iOS/Info.plist` file in your app and adding the following key:\n\n```xml\n\u003ckey\u003eNSPhotoLibraryUsageDescription\u003c/key\u003e\n\u003cstring\u003eDescription text goes here\u003c/string\u003e\n```\n\n## API\n\n### Methods\n\n* create(options) - creates instance of the imagepicker. Possible options are:\n\n| Option | Platform | Default | Description |\n| --- |  --- | --- | --- |\n| mode | both | multiple | The mode if the imagepicker. Possible values are `single` for single selection and `multiple` for multiple selection. |\n| minimumNumberOfSelection | iOS | 0 | The minumum number of selected assets. |\n| maximumNumberOfSelection | iOS | 0 | The maximum number of selected assets. |\n| showsNumberOfSelectedAssets |  iOS | True | Display the number of selected assets. |\n| prompt | iOS | undefined | Display prompt text when selecting assets. |\n| numberOfColumnsInPortrait | iOS | 4 | Set the number of columns in Portrait orientation. |\n| numberOfColumnsInLandscape | iOS | 7 | Set the number of columns in Landscape orientation. |\n| mediaType | both | Any | Choose whether to pick Image/Video/Any type of assets. |\n| showAdvanced | Android | false | Show internal and removable storage options on Android (**WARNING**: [not supported officially](https://issuetracker.google.com/issues/72053350)). |\n\nThe **hostView** parameter can be set to the view that hosts the image picker. Applicable in iOS only, intended to be used when open picker from a modal page.\n\n* authorize() - request the required permissions.\n* present() - show the albums to present the user the ability to select images. Returns an array of the selected images.\n\n## Contribute\nWe love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-imagepicker/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).\n\n  \n## Get Help \nPlease, use [github issues](https://github.com/NativeScript/nativescript-imagepicker/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out [Stack Overflow](https://stackoverflow.com/questions/tagged/nativescript) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation).\n  \n![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-imagepicker?pixel) \n","funding_links":[],"categories":["Awesome {N} [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Table of Contents"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNativeScript%2Fnativescript-imagepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNativeScript%2Fnativescript-imagepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNativeScript%2Fnativescript-imagepicker/lists"}