Skip to content

Coil usage in compose still isn't 100% clear #811

Answered by colinrtwhite
ColtonIdle asked this question in Q&A
Discussion options

You must be logged in to vote
Image(
    painter = rememberImagePainter("https://www.example.com/image.jpg"),
    contentDescription = null,
    modifier = Modifier.size(128.dp)
)

is the simplest way to use Coil in Jetpack Compose. builder is only used to configure the ImageRequest object.

allowHardware(false) and onExecute are only shown in those examples for illustrative purposes. I removed the allowHardware call from the docs since it can be a bit confusing and is only used in specific cases.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ColtonIdle
Comment options

Answer selected by ColtonIdle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants