Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
Data displayAndroid

Image

Present native images with shared fit, ratio, radius, and accessibility behavior.

Public APILumenImageAndroid / Compose

Native example

Use Image

Use for product imagery that needs shared fitting, aspect ratio, radius, and labeling. Keep decoding, caching, network policy, placeholders, retries, and optimizer behavior in the application or platform loader.

Image rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenImage(
    painter = painterResource(R.drawable.mountain_valley),
    label = "Mountain valley at sunrise",
    aspectRatio = 16f / 9f,
    fit = LumenImageFit.Cover
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenImage.

APIValues or typeDefaultDescription
painterNative image source or contentRequiredSupplies image pixels through the platform-native delivery path.
fitContain · CovercoverControls how the image fits its available bounds.
aspectRatioFloat?nullReserves a positive finite width-to-height ratio when provided.
radiusNone · Sm · Md · Lg · FulllgClips the image with a shared semantic corner radius.
labelString?nullNames meaningful imagery; omit only for decorative images.

Native behavior

Design and accessibility

When to use it

Use for product imagery that needs shared fitting, aspect ratio, radius, and labeling. Keep decoding, caching, network policy, placeholders, retries, and optimizer behavior in the application or platform loader.

Accessibility

Images are decorative when their label is absent; a label exposes the complete image as one native accessibility element.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module