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.

chirag patel
  • 229
  • 4
  • 16
  • you can try with [fresco](http://frescolib.org/) – Kaushik Dec 29 '15 at 06:15
  • 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 cache – Rajesh Jadav Dec 29 '15 at 06:29
  • check http://stackoverflow.com/questions/29363321/picasso-v-s-imageloader-v-s-fresco-vs-glide You can try fresco – Rajesh Jadav Dec 29 '15 at 06:32
  • 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. – Umer Dec 29 '15 at 06:49

3 Answers3

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.

Rajesh Jadav
  • 12,801
  • 5
  • 53
  • 78
null pointer
  • 5,874
  • 4
  • 36
  • 66
  • 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. – chirag patel Dec 29 '15 at 05:57
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 .

ADM
  • 20,406
  • 11
  • 52
  • 83
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.

Qandil Tariq
  • 539
  • 1
  • 3
  • 15