Coil 3.0: Multiplatform Image Loading
Coil 3.0 is the latest version of the popular image loading library, Coil, which introduces support for Kotlin Multiplatform. This update opens up new possibilities for developers, allowing them to use Coil with Compose Multiplatform and run their apps on iOS, desktop, and web platforms.
The main goal of Coil 3.0 is to decouple the library from the Android SDK and make it platform-agnostic. By exposing platform functionality as interfaces, Coil ensures that it can be easily adapted to different platforms. For example, Coil replaces the use of Android's Drawable class with a common Image class, which allows developers to represent images in a platform-agnostic way.
To handle image decoding and rendering across platforms, Coil leverages Skiko, a Kotlin Multiplatform library that provides bindings for the Skia graphics engine. This ensures consistent image decoding and drawing capabilities without adding any extra overhead, as Skiko is already a dependency of Compose Multiplatform.
Although Coil 3.0 is still a few months away from release, the plan to convert Coil's codebase to multiplatform is already underway. This update will enable developers to use the same API for image loading on Android, iOS, web, and desktop platforms, making it easier to build cross-platform applications.
Stay tuned for more updates on Coil 3.0 and its integration with Kotlin Multiplatform in Cash App's Summer of Kotlin Multiplatform series.