Image
A composable that lays out and draws a given Image. This will attempt to size the composable according to the Image's given width and height. However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background). Any unspecified dimension will leverage the Image's size as a minimum constraint.
Parameters
An object representing the image to be displayed. This can be a URL, a file, or any other type of object that can be used to identify the image.
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or from the backend
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
A callback function that is called when the state of the image changes.
Placeholder used when the image loading has not started yet.
Placeholder used when the image loading failed.
Optional alignment parameter used to place the image in the given bounds defined by the width and height
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the image
Optional opacity to be applied to the image when it is rendered onscreen. Default to 1f.
Optional ColorFilter to apply for the image when it is rendered onscreen
Sampling algorithm applied to the image when it is scaled and drawn into the destination. The default is FilterQuality.Low which scales using a bilinear sampling algorithm
Placeholder used when the image is loading. You can use a different one in special cases like when the image is displayed in fullscreen for example.