I am developing project in which i have to download some images from server. I have tried these 3 methods.
Picasso:
Picasso.with(context).load(image).into(holder.image);
Glide:
Glide.with(context).load(image).into(holder.image);
Volley:
imageLoader.get(image, new ImageLoader.ImageListener() {
@Override
public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {
holder.image.setImageBitmap(response.getBitmap());
}
@Override
public void onErrorResponse(VolleyError error) {
}
});
No doubt, all these methods are working very well in fast Internet connection. but in 2G It takes too much time to download image of 20kb - 25kb. I also have tried image resizing and everything. But doesn't get good result from that. I saw application like Amazon or Flipkart or any e-commerce application these apps are working very well in slow internet connection and dowanloads all images in good resolution also. So, I want some expert solutions on these problem.
But right around Google I/O, a couple of interesting new image libraries were introduced: Volley and Picasso. They don’t solve exactly the same problem, but each offers solutions for this image loading issue.
If Volley’s image management causes you severe pain, then you’re probably fine using both. I wouldn’t start off using both, however. Picasso solves a couple of pain points that Volley doesn’t address, and it’s trivial to integrate, which means that you should be perfectly fine putting off switching to Picasso until it’s necessary.
Picasso is open source and one of the widely used image download libraries in Android. It is created and maintained by Square. It is among the powerful image download and caching library for Android. Picasso simplifies the process of loading images from external URLs and displays them on your application.
Now, the ImageLoader requires an implementation of ImageCache. As of this post, Volley doesn’t include any implementations out of the box, so I have provided an empty one that doesn’t cache anything. This doesn’t mean there’s no caching-Volley caches HTTP response data for you.
Glide , Picasso are just Fetch image from the server and show it. if your network speed is less the the images take longer to to load. you need to re-size the images in the server side. Using WebP format instead of JPEG or PNG will help to reduce size without reducing quality.
Note: you can use Thumbor to accomplish this easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With