> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.chooseImage

> Choose images from album or camera.

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

## Parameters

| Property   | Type     | Required | Description                                       |
| ---------- | -------- | -------- | ------------------------------------------------- |
| sizeType   | Array    | No       | Original image, compressed image, both by default |
| sourceType | Array    | No       | Camera or album, `['camera', 'album']` by default |
| success    | Function | No       | Callback with image paths                         |
| fail       | Function | No       | Callback on failure                               |
| complete   | Function | No       | Callback that always executes                     |

## Success Callback

| Property    | Type  | Description               |
| ----------- | ----- | ------------------------- |
| apFilePaths | Array | Array of local file paths |

## Code Example

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

## Error Codes

| Code | Description            |
| ---- | ---------------------- |
| 11   | User cancels operation |

## Related APIs

<CardGroup cols={2}>
  <Card title="my.previewImage" icon="eye" href="/jsapi/media/image/my.previewImage">
    Preview images
  </Card>

  <Card title="my.saveImage" icon="download" href="/jsapi/media/image/my.saveImage">
    Save image
  </Card>
</CardGroup>
