How to download image faster in android Volley/Picasso/Glide any other?
Asked Answered
I

3

6

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.

Interpellate answered 29/12, 2015 at 5:32 Comment(4)
you can try with frescoCaterwaul
If you use this library it first time it takes time to download image and after that it automatically loads image faster as it display images from cacheMultitudinous
check #29363821 You can try frescoMultitudinous
If you compare these three libraries i think Glide is best. Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. And at least its faster then Picasso.Coarsen
P
2

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.

Privateer answered 29/12, 2015 at 5:41 Comment(1)
Thank you. I will try this. I also have e-commerce project. Right now, In this project have only 20 images so it will be easy for me to change format of all these. But, What to do in e-commerce it has around 1 lac products. I cant change all those image's format. So what to do in that.Interpellate
L
0

If you have to download individual image on some click and save them to sdcard . Them Android's DownLoadManager class is the perfect and easy solution for this . Or If you want to show a heap of image in your application from web then Universal Image Loader is useful as same as Volley and Picasso . For downloading image Faster you have to reduce their size .Use WebP format instead of Jpeg or PNG at server end .

Lenrow answered 29/12, 2015 at 5:56 Comment(0)
W
0

If caching is not required and downloading direct from network then Picasso is a good option. If caching is required then use AQuery for images(or large images). There are multiple options of caching in AQuery.

Whitefaced answered 29/12, 2015 at 7:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.