interface ImageOptions {
    allowEditing?: boolean;
    correctOrientation?: boolean;
    direction?: CameraDirection;
    height?: number;
    presentationStyle?: "fullscreen" | "popover";
    promptLabelCancel?: string;
    promptLabelHeader?: string;
    promptLabelPhoto?: string;
    promptLabelPicture?: string;
    quality?: number;
    resultType: CameraResultType;
    saveToGallery?: boolean;
    source?: CameraSource;
    webUseInput?: boolean;
    width?: number;
}

Properties

allowEditing?: boolean

Whether to allow the user to crop or make small edits (platform specific). On iOS 14+ it's only supported for CameraSource.Camera, but not for CameraSource.Photos.

Since

1.0.0

correctOrientation?: boolean

Whether to automatically rotate the image "up" to correct for orientation in portrait mode @default: true

Since

1.0.0

direction?: CameraDirection

iOS and Web only: The camera direction. @default: CameraDirection.Rear

Since

1.0.0

height?: number

The desired maximum height of the saved image. The aspect ratio is respected.

Since

1.0.0

presentationStyle?: "fullscreen" | "popover"

iOS only: The presentation style of the Camera. @default: 'fullscreen'

Since

1.0.0

promptLabelCancel?: string

Text value to use when displaying the prompt. iOS only: The label of the 'cancel' button. @default: 'Cancel'

Since

1.0.0

promptLabelHeader?: string

Text value to use when displaying the prompt. @default: 'Photo'

Since

1.0.0

promptLabelPhoto?: string

Text value to use when displaying the prompt. The label of the button to select a saved image. @default: 'From Photos'

Since

1.0.0

promptLabelPicture?: string

Text value to use when displaying the prompt. The label of the button to open the camera. @default: 'Take Picture'

Since

1.0.0

quality?: number

The quality of image to return as JPEG, from 0-100 Note: This option is only supported on Android and iOS

Since

1.0.0

resultType: CameraResultType

How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported

Since

1.0.0

saveToGallery?: boolean

Whether to save the photo to the gallery. If the photo was picked from the gallery, it will only be saved if edited. @default: false

Since

1.0.0

source?: CameraSource

The source to get the photo from. By default this prompts the user to select either the photo album or take a photo. @default: CameraSource.Prompt

Since

1.0.0

webUseInput?: boolean

Web only: Whether to use the PWA Element experience or file input. The default is to use PWA Elements if installed and fall back to file input. To always use file input, set this to true.

Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements

Since

1.0.0

width?: number

The desired maximum width of the saved image. The aspect ratio is respected.

Since

1.0.0