Skip to main content
Use this API to select images from the device album or capture using the camera.

Parameters

PropertyTypeRequiredDescription
countNumberNoMaximum number of images (default: 1)
sourceTypeArrayNoSources: ['album'], ['camera'], or both
successFunctionNoCallback with image paths
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
apFilePathsArrayArray of local file paths

Code Example

my.chooseImage({
  count: 3,
  sourceType: ['album', 'camera'],
  success: (res) => {
    console.log('Selected images:', res.apFilePaths);
  }
});

my.previewImage

Preview images

my.saveImage

Save image