Coil 3.0: Image loading for Compose Multiplatform
Coil 3.0 is out now with full support for Compose Multiplatform. It supports all major platforms so you can now load images on Android, iOS, JVM, JS, and WASM all with the same common API. It also has a ton of other improvements including:
- Support for multiple networking libraries (OkHttp and Ktor). Additionally, Coil can now be used without a network dependency if you only need to load local files.
- Support for Compose Multiplatform Resources loaded via
Res.getUri
. - Better compatibility for
rememberAsyncImagePainter
with Paparazzi, Roborazzi, and the Compose Preview Screenshot Testing library. - Enable restarting the same image request via
AsyncImagePainter.restart()
. - Improve Compose
@Preview
rendering and support for custom preview behavior viaLocalAsyncImagePreviewHandler
. - Support for custom disk caching behavior for images loaded from the network via
CacheStrategy
.
Coil 3.0 uses the same API as Coil 2.0 so it’s easy to load images from the network (or elsewhere) on any platform that Compose Multiplatform supports: