Skip to main content
Pass FileKitType.Image, Video, or ImageAndVideo to the file picker. On Android and iOS it opens the system photo picker; on other targets it opens a file dialog filtered to media files.

Usage

The result is null when the user cancels. Failures go to onError in Compose, or are thrown as a FileKitDialogException by the suspend API. See Results and errors. Every file picker option applies, including the state-tracking modes.

Try it

This is the FileKit sample running in your browser. Choose images, videos, or both, switch the selection mode, then open a file to inspect its metadata. In a browser the picker is a file input filtered to media files.

What users see

The Android Photo Picker

Limit the number of items

Use FileKitMode.Multiple(maxItems) with a value from 1 to 50. The same mode works on rememberFilePickerLauncher:
The iOS picker and the Android Photo Picker enforce the limit in their UI. When Android falls back to the document picker, and on other targets, the dialog canโ€™t limit the selection, so FileKit keeps the first maxItems files.
iOS can return photos as HEIC, which some image decoders and servers canโ€™t read. In iosMain, pass FileKitDialogSettings(assetRepresentationMode = FileKitAssetRepresentationMode.Compatible) as dialogSettings so iOS transcodes them to a more compatible format.