Mobile Image Input

Take a photo with the camera or select photos from the library.

An input field to capture images from the device's camera or photo library. Image Input supports taking or selecting multiple photos, minimum and maximum count, and quality adjustments.

Captured images are temporarily stored on the device for native apps and in the Retool organization for web apps.

Image Input


Available properties for Mobile Image Input. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

cameraOpened boolean

Whether the device's camera is currently open.

disabled boolean

Whether the component is disabled to prevent user interaction.

files { lastModified: number; name: string; size: number; type: string; }[]

The metadata from the selected files. Includes name, type, size, and last modified.

id string

The name of the component.

label string

Text label for the input.

launchMode 'camera' │ 'library' │ 'option'

Input method for images. Use camera to use the camera, library to upload existing photos, or option to allow users to choose.

libraryOpened boolean

Whether the device's photo library is currently open.

maintainSpaceWhenHidden boolean

Whether the component takes up space on the canvas when hidden.

maxCount number | null

The maximum number of items allowed

minCount number | null

The minimum number of items allowed.

placeholder string

The text to display when no value is set.

pluginType string

The component type.

resolution 'original' | 'high' | 'medium' | 'low'

The resolution with which to optimize captured images.

selectionType 'single' │ 'multiple' │ 'directory'

The type of selection to allow.

shouldCompress boolean

Whether to compress captured images.

showInEditor boolean

Whether the component remains visible in the editor when hidden is true.

tooltipText string

The text to display in a tooltip on hover or focus.

value array

The value of the component. Contains an array of blob: or file:// URI strings for captured data (e.g., for upload to a data store). Use utils.getDataByObjectURL() if you need to convert the blob into a Base64-encoded string.