Coil now supports multiple networking libraries. You can use OkHttp on JVM/Android and Ktor if you need multiplatform support.
Coil no longer has a hard dependency on OkHttp so you don't have to import it if you only load images from local sources (file system, content providers, resources, etc.)
If you set a custom OkHttpClient it can be done like so:
Opening this preemptively to catch incoming issue when upgrading from Coil 2.0 to 3.0. You need to add Coil 3.0's new network dependency:
This change was made for two reasons:
If you set a custom
OkHttpClient
it can be done like so: