Load and display a remote image in an Android Compose screen using a single AsyncImage composable.
Build a scrolling image gallery that automatically cancels in-flight image loads when items scroll off screen.
Cache product images in an e-commerce Android app to reduce data usage and make the UI feel faster.
Migrate an existing Android app from Glide or Picasso to a modern Kotlin-first library with Compose Multiplatform support.
Requires adding OkHttp or Ktor as a networking dependency alongside Coil for image downloading to work.
Coil is an image loading library for Android apps and apps built with Compose Multiplatform, which is a toolkit for building apps that run on multiple platforms from shared Kotlin code. Its job is to fetch images from a URL and display them in your app efficiently, handling the complex parts of that process so you do not have to. The name is an acronym for Coroutine Image Loader. Coroutines are a Kotlin feature for handling background work, like downloading a file, without freezing the app's interface. Coil uses coroutines internally to load images without blocking the main thread. The README describes it as fast, lightweight, easy to use, and modern. In terms of performance, Coil caches images in memory and on disk, scales images down to the size they actually need to be shown at rather than loading full-resolution files, and automatically pauses or cancels image requests when they are no longer needed, for example when a user scrolls past a list item. These behaviors happen by default without you needing to configure them. The API is designed to stay out of your way. When using Compose, loading an image from a URL takes a single composable called AsyncImage, which you pass the image URL and a description. That is the entire integration for a basic setup. Additional configuration is available for caching policies, transformations, placeholder images, and error states. Coil depends only on Kotlin, Coroutines, and Okio (a small I/O library), plus an optional networking library like OkHttp or Ktor. It is licensed under the Apache 2.0 license and the full documentation is available on the project's website.
← coil-kt on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.