FileImage

@Composable
fun FileImage(file: FilePart, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Crop, fitToImage: Boolean = false, maxDecodePx: Int = 1600)(source)

An image from a FilePart (AI Elements <Image>): decodes data: URLs and fetches http(s) URLs off the main thread, downsampled to maxDecodePx.

With fitToImage the box takes the image's aspect ratio (for inline images with a width but no height); otherwise it fills the size given by modifier.