Image Picker

Improve this doc

$ ionic plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker

Repo: https://github.com/Telerik-Verified-Plugins/ImagePicker

Cordova Plugin For Multiple Image Selection

Requires Cordova plugin: cordova-plugin-image-picker. For more info, please see the https://github.com/wymsee/cordova-imagePicker

Usage

import { ImagePicker } from 'ionic-native';



ImagePicker.getPictures(options).then((results) => {
  for (var i = 0; i < results.length; i++) {
      console.log('Image URI: ' + results[i]);
  }
}, (err) => { });

Static Members

getPictures(options)

Pick pictures from the library.

Param Type Details
options ImagePickerOptions

Returns: Promise<any> Returns a Promise that resolves the image file URI otherwise rejects with an error.

hasReadPermission()

Platforms: Android 

Check if we have permission to read images

Returns: Promise<boolean> Returns a promise that resolves with a boolean that indicates whether we have permission

requestReadPermission()

Platforms: Android 

Request permission to read images

Returns: Promise<any>

ImagePickerOptions

Param Type Details
maximumImagesCount
(optional)
number

max images to be selected, defaults to 15. If this is set to 1, upon selection of a single image, the plugin will return it.

width
(optional)
number

Max width to allow images to be

height
(optional)
number

Max height to allow images to be

quality
(optional)
number

Quality of images, defaults to 100

API

Native

General