367

Findings:

  1. Difference between Picasso v/s ImageLoader here ...
  2. Info about the library GLIDE here ...
  3. Facebook has its own library Fresco
  4. Newest addition to the list Coil

Questions:

  1. What is the difference between Picasso v/s Imageloader v/s Fresco v/s Coil
  2. Which is the best library to use.
  3. If each library has its own significance, what are they ?
Community
  • 1
  • 1
Devrath
  • 42,072
  • 54
  • 195
  • 297

6 Answers6

195

I am one of the engineers on the Fresco project. So obviously I'm biased.

But you don't have to take my word for it. We've released a sample app that allows you to compare the performance of five libraries - Fresco, Picasso, UIL, Glide, and Volley Image Loader - side by side. You can get it at our GitHub repo.

I should also point out that Fresco is available on Maven Central, as com.facebook.fresco:fresco.

Fresco offers features that Picasso, UIL, and Glide do not yet have:

  1. Images aren't stored in the Java heap, but in the ashmem heap. Intermediate byte buffers are also stored in the native heap. This leaves a lot more memory available for applications to use. It reduces the risk of OutOfMemoryErrors. It also reduces the amount of garbage collection apps have to do, leading to better performance.
  2. Progressive JPEG images can be streamed, just like in a web browser.
  3. Images can be cropped around any point, not just the center.
  4. JPEG images can be resized natively. This avoids the problem of OOMing while trying to downsize an image.

There are many others (see our documentation), but these are the most important.

serv-inc
  • 35,772
  • 9
  • 166
  • 188
tyronen
  • 2,558
  • 1
  • 11
  • 15
  • 2
    Thanks, can you attach the result of "We've released a sample app that allows you to compare the performance of five libraries" in a tabular format to your answer? – mmlooloo Apr 10 '15 at 18:44
  • 1
    Fresco has some more features than the others, but is also way bigger .. – ligi Apr 13 '15 at 12:42
  • 4
    they added an 's' at the back of the link. https://github.com/facebook/fresco/tree/master/samples – JR Tan Jun 24 '15 at 17:08
  • @tyronen im interested in Fresco. Does it allow to load local images instead from network? Thanks – GmloMalo Oct 18 '15 at 13:47
  • @GmloMalo yes, it does. – tyronen Oct 21 '15 at 10:08
  • If anyone has apk of the sample, please upload it and send a link here to try it. Tnx – Shayan Amani Jan 09 '16 at 10:47
  • @tyronen I am still new to all this, how do we load and compile the source to the comparison app? – Tanner Summers Mar 02 '16 at 20:30
  • I used picasso and glide. But a white screen appears after fetching data from server, because there are number of images coming from server using Retrofit. After keep on pressing back button, the images are seen. Now do I need to switch to Fresco? This is the major issue I have been go through these days. Please help. – Pihu Apr 29 '16 at 05:49
  • @tyronen one qtn.. why fresco use the SimpleDraweeView? any advantages in this view? – Ranjithkumar Oct 19 '16 at 08:19
  • I am trying to migrate from Picasso to Fresco, but app freezes while loading a big image. I'm using the latest version(0.14.1). – Kimi Chiu Nov 15 '16 at 04:25
  • Is this post still current? – wedi Nov 28 '17 at 16:11
  • 1
    @wedi yes it is. – tyronen Oct 05 '18 at 13:53
139

Mind you that this is a highly opinion based question, so I stopped making fjords and made a quick table

enter image description here

Now library comparison is hard because on many parameters, all the four pretty much do the same thing, except possibly for Fresco because there is a whole bunch of new memory level optimizations in it.So let me know if certain parameters you'd like to see a comparison for based on my experience.

Having used Fresco the least, the answer might evolve as I continue to use and understand it for current exploits. The used personally is having used the library atleast once in a completed app.

*Note - Fresco now supports GIF as well as WebP animations

Vipul Asri
  • 8,903
  • 3
  • 46
  • 71
Vrashabh Irde
  • 14,129
  • 6
  • 51
  • 103
124

Fresco sources | off site

(-)

  • Huge size of library
  • No Callback with View, Bitmap parameters
  • SimpleDraweeView doesn't support wrap_content
  • Huge size of cache

(+)

  • Pretty fast image loader (for small && medium images)
  • A lot of functionality(streaming, drawing tools, memory management, etc)
  • Possibility to setup directly in xml (for example round corners)
  • GIF support
  • WebP and Animated Webp support

Picasso sources | off site

(-)

  • Slow loading big images from internet into ListView

(+)

  • Tinny size of library
  • Small size of cache
  • Simple to use
  • UI does not freeze
  • WebP support

Glide sources

(-)

  • Big size of library

(+)

  • Tinny size of cache
  • Simple to use
  • GIF support
  • WebP support
  • Fast loading big images from internet into ListView
  • UI does not freeze
  • BitmapPool to re-use memory and thus lesser GC events

Universal Image Loader sources

(-)

  • Limited functionality (limited image processing)
  • Project support has stopped since 27.11.2015

(+)

  • Tinny size of library
  • Simple to use

Tested by me on SGS2 (Android 4.1) (WiFi 8.43 Mbps) Official versions for Java, not for Xamarin! October 19 2015 I prefer to use Glide. Read more here. How to write cache to External Storage (SD Card) with Glide.

Minh Nghĩa
  • 854
  • 1
  • 11
  • 28
Volodymyr Kulyk
  • 6,455
  • 3
  • 36
  • 63
  • 4
    "Pretty fast image loader" seems to contradict "App freeze" for Fresco. – TWiStErRob May 23 '16 at 21:44
  • 2
    I have Picasso in a Xamarin project and memory usage was HUGE (used to load images into recycler view). `OutOfMemory` all the time... – Vahid Amiri Aug 20 '16 at 16:54
  • @VSG24 there are 2 options: 1) you are using it wrong. 2) Android (java) version of the lib is not the same for Xamarain – Volodymyr Kulyk Aug 22 '16 at 07:17
  • 1
    As a Glide negative(-) I've experienced a lot of flickering. Loaded images would get "re-set" out of nowhere – frankelot Sep 28 '16 at 07:38
  • Nice answer! one thing, I may not agree with your idea that Glide is a "small size of library" though. – shoheikawano Nov 08 '16 at 04:59
  • @shaunkawano agree. It was year ago.. i'll modify my answer. – Volodymyr Kulyk Nov 08 '16 at 11:11
  • Fresco still freezes today. If they can fix this problem or give us a workaround, I'll choose Fresco. – Kimi Chiu Nov 15 '16 at 04:30
  • @KimiChiu can you put a reference for this bug? I want to check if it got fixed before I decide on fresco – usernotnull Mar 27 '17 at 06:30
  • 1
    @RJFares I tried the latest version recently, you can use `ImagePipelineConfig.setDownsampleEnabled(true)` to prevent it from freezing. But it sometimes skip frames of a GIF. If you only display static images on your app, I think you can give it a try. – Kimi Chiu Mar 28 '17 at 04:23
  • @VolodymyrKulyk: For picasso: "Slow loading big images from internet into ListView" how come this is mentoned as a problem only for Picasso? What is the difference with the rest? – Jim Nov 19 '21 at 09:57
  • @Jim those benchmarks were performed on `October 19 2015`. I suppose it's not relevant now. – Volodymyr Kulyk Nov 19 '21 at 11:04
  • @VolodymyrKulyk: thanks for responding to this old thread. I understand that they are old. I was curious if you had an idea why this was happening back then if you can remember – Jim Nov 19 '21 at 11:31
115

These answers are totally my opinion

Answers

  1. Picasso is an easy to use image loader, same goes for Imageloader. Fresco uses a different approach to image loading, i haven't used it yet but it looks too me more like a solution for getting image from network and caching them then showing the images. then the other way around like Picasso/Imageloader/Glide which to me are more Showing image on screen that also does getting images from network and caching them.

  2. Glide tries to be somewhat interchangeable with Picasso.I think when they were created Picasso's mind set was follow HTTP spec's and let the server decide the caching policies and cache full sized and resize on demand. Glide is the same with following the HTTP spec but tries to have a smaller memory footprint by making some different assumptions like cache the resized images instead of the fullsized images, and show images with RGB_565 instead of RGB_8888. Both libraries offer full customization of the default settings.

  3. As to which library is the best to use is really hard to say. Picasso, Glide and Imageloader are well respected and well tested libraries which all are easy to use with the default settings. Both Picasso and Glide require only 1 line of code to load an image and have a placeholder and error image. Customizing the behaviour also doesn't require that much work. Same goes for Imageloader which is also an older library then Picasso and Glide, however I haven't used it so can't say much about performance/memory usage/customizations but looking at the readme on github gives me the impression that it is also relatively easy to use and setup. So in choosing any of these 3 libraries you can't make the wrong decision, its more a matter of personal taste. For fresco my opinion is that its another facebook library so we have to see how that is going to work out for them, so far there track record isn't that good. Like the facebook SDK is still isn't officially released on mavenCentral I have not used to facebook sdk since sept 2014 and it seems they have put the first version online on mavenCentral in oct 2014. So it will take some time before we can get any good opinion about it.

  4. between the 3 big name libraries I think there are no significant differences. The only one that stand out is fresco but that is because it has a different approach and is new and not battle tested.

rmanalo
  • 342
  • 3
  • 23
Aegis
  • 5,761
  • 2
  • 33
  • 42
  • 3
    Minor nit: it seems that the Facebook SDK has been officially available as an AAR on Maven Central for a while. https://developers.facebook.com/docs/android/getting-started#androidstudio – orip Apr 28 '15 at 11:13
  • 1
    thx for the correction, It has been awhile since I used the facebook SDK so I had not checked that. Still it took them too long to put in on there. – Aegis Apr 28 '15 at 15:16
  • 1
    A year down the line after reading this, I am still wondering if I should use Frescoe and I still can't see why I should. While Glide and Picasso work out of the box, Frescoe just needs you to do so many things that it doesn't look like it is worth it and the size.... – frostymarvelous Mar 02 '16 at 09:43
  • I want to point out that fresco has memory-issues: https://github.com/facebook/react-native/issues/8711 – Fabian Zeindl Jul 12 '16 at 12:56
  • I've also experienced the memory issues with fresco, unfortunately it seems like it has to be either fresco or glide if you need animated gif support. Also FWIW [here's a link](http://codix.io/c?repos=484%2C711%2C392%2C373) to some additional comparison details. – Nick Feb 07 '17 at 17:17
  • how do you customize cache size on picasso? – f.khantsis Mar 23 '17 at 16:41
65

Neither Glide nor Picasso is perfect. The way Glide loads an image to memory and do the caching is better than Picasso which let an image loaded far faster. In addition, it also helps preventing an app from popular OutOfMemoryError. GIF Animation loading is a killing feature provided by Glide. Anyway Picasso decodes an image with better quality than Glide.

Which one do I prefer? Although I use Picasso for such a very long time, I must admit that I now prefer Glide. But I would recommend you to change Bitmap Format to ARGB_8888 and let Glide cache both full-size image and resized one first. The rest would do your job great!

  • Method count of Picasso and Glide are at 840 and 2678 respectively.
  • Picasso (v2.5.1)'s size is around 118KB while Glide (v3.5.2)'s is around 430KB.
  • Glide creates cached images per size while Picasso saves the full image and process it, so on load it shows faster with Glide but uses more memory.
  • Glide use less memory by default with RGB_565.

+1 For Picasso Palette Helper.

There is a post that talk a lot about Picasso vs Glide post

Daniel Gomez Rico
  • 15,026
  • 20
  • 92
  • 162
  • Excellent article. I am switching to Glide now. Even better than Picasso is not what I had in mind. :) – Sufian Sep 18 '15 at 12:44
  • 1
    One issue I see is that Glide requires API 10. It's a bit of a problem as I can't drop API 9 support from my app. Otherwise surely a better way to go. – Sufian Sep 18 '15 at 12:53
  • Can you explain why are you using api 9? just curious... – Daniel Gomez Rico Sep 18 '15 at 14:31
  • Unless I'm missing something, it's to support all Gingerbread versions. – Sufian Sep 18 '15 at 14:36
  • But why do you give support for that? – Daniel Gomez Rico Sep 18 '15 at 17:48
  • 1
    I think it's a bit subjective. But it's a better thing to support as many devices/versions as possible. No? :) – Sufian Sep 19 '15 at 15:34
  • I ran it on API 9 Emulator and it ran fine. According to [an issue on GitHub](https://github.com/bumptech/glide/issues/234), it says **it may work with 9, if you don't use video**. Guess I can give it a try. :D – Sufian Sep 28 '15 at 07:11
  • @Sufian what's the verdict? – TWiStErRob May 23 '16 at 21:38
  • @TWiStErRob so far I haven't received any crash report on Crashlytics. It might be that nobody is using API 9 (I read heard/read that switching between 9 or 10 doesn't make much of a difference because 10 was just a bug-fix release). So yeah, I don't know. :| – Sufian May 24 '16 at 10:48
18

I want to share with you a benchmark I have done among Picasso, Universal Image Loader and Glide.

Fresco was out of the benchmark because for the project I was running the test, we didn't want to refactor our layouts (because of the Drawee view).

What I recommend is Universal Image Loader because of its customization, memory consumption and balance between size and methods.

If you have a small project, I would go for Glide (or give Fresco a try).

General Grievance
  • 4,555
  • 31
  • 31
  • 45
shollmann
  • 297
  • 2
  • 8