Interface ImageOptions

interface ImageOptions {
    allowEditing?: boolean;
    direction?: CameraDirection;
    height?: number;
    promptLabelCancel?: string;
    promptLabelHeader?: string;
    promptLabelPhoto?: string;
    promptLabelPicture?: string;
    quality?: number;
    resultType: CameraResultType;
    source?: CameraSource;
    width?: number;
}

Properties

allowEditing?: boolean

Whether to allow editing. Not supported on HarmonyOS system pickers — ignored.

direction?: CameraDirection

Camera direction when source is CAMERA; defaults to Rear

height?: number

Target height; aspect ratio is preserved when only one dimension is given

promptLabelCancel?: string

Label of the cancel button. Not supported on HarmonyOS (the ActionMenu is dismissed via back/overlay) — accepted for @capacitor/camera drop-in compatibility, ignored.

promptLabelHeader?: string

ActionSheet title for the PROMPT source (default 'Photo')

promptLabelPhoto?: string

ActionSheet label for choosing the gallery (default 'From Photos')

promptLabelPicture?: string

ActionSheet label for choosing the camera (default 'Take Picture')

quality?: number

JPEG quality 0-100 (applied when returning base64/dataUrl)

resultType: CameraResultType

Required: how the data should be returned

source?: CameraSource

Source; defaults to CameraSource.Prompt

width?: number

Target width; aspect ratio is preserved when only one dimension is given