Picasso v/s Imageloader v/s Fresco vs Glide vs Coil [closed]
Asked Answered
A

6

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 ?
Anguiano answered 31/3, 2015 at 7:48 Comment(0)
D
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.

Dagenham answered 10/4, 2015 at 18:2 Comment(12)
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?Joettejoey
Fresco has some more features than the others, but is also way bigger ..Hopkins
they added an 's' at the back of the link. github.com/facebook/fresco/tree/master/samplesBookstack
@Dagenham im interested in Fresco. Does it allow to load local images instead from network? ThanksSaltcellar
@Saltcellar yes, it does.Dagenham
If anyone has apk of the sample, please upload it and send a link here to try it. TnxJeer
@Dagenham I am still new to all this, how do we load and compile the source to the comparison app?Shriner
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.Jesusitajet
@Dagenham one qtn.. why fresco use the SimpleDraweeView? any advantages in this view?Ochrea
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).Overstrung
Is this post still current?Penneypenni
@Penneypenni yes it is.Dagenham
T
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

Typo answered 16/4, 2015 at 14:13 Comment(8)
I am curious about the lower 'Customizability', 'Network Image Use', and 'Ease of use' ratings for Fresco. What is the basis of these ratings?Dagenham
Mostly first use, will be using Fresco a bit more to understand, this answer might evolve :)Typo
Version numbers could have been nice because for example Glide evolves hugely with major version releases (unlike Firefox :()Regan
@Slartibartfast Did you get a chance to try Fresco and the latest Glide 3.0 version ? Would you still rate them the same ?Geminate
Yes! Fresco is pretty good, havent had time to update this answer, I willTypo
You missed one important aspect. ...the library size. This is the main reason why Picasso and UImageLoader do not support GIF. Licenses would also be good to include.Moreau
What does Used Personally means?Wooton
@AhamadullahSaikat The ones he used personally.Simpatico
L
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.

Lambaste answered 19/10, 2015 at 9:13 Comment(12)
"Pretty fast image loader" seems to contradict "App freeze" for Fresco.Regan
I have Picasso in a Xamarin project and memory usage was HUGE (used to load images into recycler view). OutOfMemory all the time...Brophy
@VSG24 there are 2 options: 1) you are using it wrong. 2) Android (java) version of the lib is not the same for XamarainLambaste
As a Glide negative(-) I've experienced a lot of flickering. Loaded images would get "re-set" out of nowhereQuinte
Nice answer! one thing, I may not agree with your idea that Glide is a "small size of library" though.Bathos
@shaunkawano agree. It was year ago.. i'll modify my answer.Lambaste
Fresco still freezes today. If they can fix this problem or give us a workaround, I'll choose Fresco.Overstrung
@KimiChiu can you put a reference for this bug? I want to check if it got fixed before I decide on frescoLichenin
@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.Overstrung
@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?Clougher
@Clougher those benchmarks were performed on October 19 2015. I suppose it's not relevant now.Lambaste
@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 rememberClougher
M
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.

Morphosis answered 10/4, 2015 at 9:42 Comment(6)
Minor nit: it seems that the Facebook SDK has been officially available as an AAR on Maven Central for a while. developers.facebook.com/docs/android/…Baalman
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.Morphosis
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....Hairworm
I want to point out that fresco has memory-issues: github.com/facebook/react-native/issues/8711Stiegler
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 to some additional comparison details.Underneath
how do you customize cache size on picasso?Allineallis
A
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

Aetna answered 18/4, 2015 at 16:59 Comment(9)
Excellent article. I am switching to Glide now. Even better than Picasso is not what I had in mind. :)Nenitanenney
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.Nenitanenney
Can you explain why are you using api 9? just curious...Aetna
Unless I'm missing something, it's to support all Gingerbread versions.Nenitanenney
But why do you give support for that?Aetna
I think it's a bit subjective. But it's a better thing to support as many devices/versions as possible. No? :)Nenitanenney
I ran it on API 9 Emulator and it ran fine. According to an issue on GitHub, it says it may work with 9, if you don't use video. Guess I can give it a try. :DNenitanenney
@Nenitanenney what's the verdict?Regan
@Regan 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. :|Nenitanenney
P
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).

Predella answered 13/11, 2015 at 0:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.