Points of comparison:
- Methods count
- Size
- GIF support
GitHub links and versions I used: Picasso, Glide, Coil. (2.71828, 4.9.0, 0.6.1)
Release date: Picasso and Glide were first released in 2013. And Coil is very young, released on 12 August 2019.
Methods count
How many methods each of them will add to your project (proguard enabled):
- Picasso: 235
- Coil: 456 (483 when GIF supported)
- Glide: 1646
But when we count including added methods from the dependencies:
- Picasso: 1795 (okHttp, okio)
- Glide: 1974
- Coil: 3159 (okHttp, okio, coroutines) – 3236 (when GIF supported)
So for example, if your project is already has a dependency on okHttp, okio and coroutines, Coil library will add significantly fewer methods.
Coil dependencies methods count: 3236 (total) – 483 (Coil code) = 2753
786 (okHttp) + 319 (okio) + 655 (coroutines) = 1760
Other Coil dependencies: 2753 – 1760 (okHttp+okio+coroutines) = 993
Size (KB)
- Glide: 112
- Picasso: 162
- Coil: 250 (253 when GIF supported)
GIF Animation support
Glide and Coil supports GIF Animation and Picasso don’t.
Summary
- The size and number of methods that the chosen image loading library would add to your project rely on which dependency you already have.
- Consider making an abstraction for your image loading library. For example Kotlin ImageView extension function. This will simplify your tests while choosing the right one.
- If you need GIF Animation support you should choose between Glide and Coil.
- Coil is a very young library and I would wait a while before adding it to the main project.
- Coil is Kotlin-first and uses modern libraries including Coroutines, OkHttp, Okio, and AndroidX Lifecycles.
Trung Nguyen
June 10, 2020Tks for your post. It is so amazing !!!
And can you tell me how you count the number of method and size of each library ??
rufjvmbn
June 11, 2020Thanks.
Just checked in Android Studio and on http://www.methodscount.com/ that offline right now…