Hey how can I avoid the auto-rotation behavior for...
# compose
r
Hey how can I avoid the auto-rotation behavior for images in CoilImage? I have a circular avatar that looks like the below and if I take a selfie it automatically rotates. Is there a configuration option for this or do I have to create an Exif interface for the bitmap?
Copy code
@Composable
fun ImageAvatar(bitmap: Bitmap, onClick: (() -> Unit)? = null) {
    var modifier = Modifier
        .preferredSize(70.dp)
        .clip(CircleShape)
        .background(backgroundSecondary())
        .border(BorderStroke(1.dp, backgroundPrimary()), shape = CircleShape)

    onClick?.let { clickListener ->
        modifier = modifier.clickable(onClick = clickListener)
    }

    Box(modifier = modifier, alignment = Alignment.Center) {
        CoilImage(
            data = bitmap,
            contentScale = ContentScale.Crop,
            requestBuilder = {
                transformations(CircleCropTransformation())
            },
            modifier = Modifier.preferredSize(70.dp)
        )
    }
}