Skip to content

Coil loads images at initial resolution, causing rescaling to look pixelated #3196

@Martmists-GH

Description

@Martmists-GH

Describe the bug

The image is downscaled when shown at a low resolution, however when the Density increases, the image does not rescale appropriately.
(open images in new tab for better example)

Image Image

To Reproduce

var scale by remember { mutableStateOf(1f) }  // Add a way to change this
val oldDensity = LocalDensity.current
val newDensity = Density(oldDensity.density * scale, oldDensity.fontScale)
CompositionLocalProvider(
    LocalDensity provides newDensity
) {
    AsyncImage(url, "")
}

Version
Coil 3.3.0, both on desktop and web (wasm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions