# PhotoGalleryOptionsType

> Simple object for specifying options to [openPhotoGallery](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#openPhotoGallery).

- Source: https://titaniumsdk.com/docs/sdk/main/PhotoGalleryOptionsType
- Titanium SDK version: main
- Kind: pseudo
- Platforms: Android, iPhone, iPad, macOS

## Properties

### allowEditing

- Type: Boolean
- Platforms: iPhone, iPad, macOS

Specifies if the media should be editable after capture/selection.

### allowMultiple

- Type: Boolean
- Platforms: Android, iPhone, iPad
- Since: Titanium SDK Android 6.0.0, iPhone 9.2.0, iPad 9.2.0
- Requires: iOS 14.0+

Specifies if the user should be able to select multiple photos.

The allowMultiple property is only available on Android API 18 and above.

### allowTranscoding

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 8.1.0
- Default: `true`

Specifies if the video should be transcoded (using highest quality preset) . If set to false no video transcoding will be performed.

### animated

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `true`

Specifies if the dialog should be animated upon showing and hiding.

### arrowDirection

- Type: Number
- Platforms: iPad, macOS

Controls the type of arrow and position of the popover.

Accepts: `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_ANY`, `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_DOWN`, `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT`, `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT`, `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UNKNOWN`, `Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UP`

### autohide

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `true`

Specifies if the photo gallery should be hidden automatically after the media
selection is completed.

### cancel

- Type: Callback<FailureResponse>
- Platforms: Android, iPhone, iPad, macOS

Function to call if the user presses the cancel button.

### error

- Type: Callback<FailureResponse>
- Platforms: Android, iPhone, iPad, macOS

Function to call upon receiving an error.

### maxImages

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 12.5.0

Specifies the number of images a user can select at maximum.

Only available on Android API 21 and above and with `allowMultiple:true`

### mediaTypes

- Type: Array<String>
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 7.3.0, iPhone 0.8, iPad 0.8
- Default: `Only photo and video allowed.`

Array of media type constants to allow.

Live photos is only supported on the iOS platform, starting with iOS 9.1. If you want
to allow live photos with [Titanium.Media.MEDIA_TYPE_LIVEPHOTO](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#MEDIA_TYPE_LIVEPHOTO), you also need to specify
at least [Titanium.Media.MEDIA_TYPE_PHOTO](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#MEDIA_TYPE_PHOTO) as a fallback. If you do not allow live
photos, they still can be selected, but will be represented as a normal static photo.

Accepts: `Titanium.Media.MEDIA_TYPE_LIVEPHOTO`, `Titanium.Media.MEDIA_TYPE_PHOTO`, `Titanium.Media.MEDIA_TYPE_VIDEO`

### pathOnly

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 12.5.0

Do not include the blob in the result

### popoverView

- Type: Titanium.UI.View
- Platforms: iPad, macOS

View to position the photo gallery popover on top of.

### selectionLimit

- Type: Boolean
- Platforms: iPhone, iPad
- Since: Titanium SDK 9.2.0
- Requires: iOS 14.0+

Specifies number of media item that can be selected.

Setting this property to zero allows you to select maximum number of media supported by system.
This will work only when [PhotoGalleryOptionsType.allowMultiple](https://titaniumsdk.com/docs/sdk/PhotoGalleryOptionsType.md#allowMultiple) is `true`.

### success

- Type: Callback<CameraMediaItemType> | Callback<CameraMediaMultipleItemsType>
- Platforms: Android, iPhone, iPad, macOS

Function to call when the photo gallery is closed after a successful selection.

If [PhotoGalleryOptionsType.allowMultiple](https://titaniumsdk.com/docs/sdk/PhotoGalleryOptionsType.md#allowMultiple) is `true`, then Callback[CameraMediaMultipleItemsType](https://titaniumsdk.com/docs/sdk/CameraMediaMultipleItemsType.md) will be invoked.
Otherwise Callback[CameraMediaItemType](https://titaniumsdk.com/docs/sdk/CameraMediaItemType.md) will be invoked for single selection.

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

