Android – if I use Picasso or glass or volley to retrieve it, do I need to provide images of different sizes?

Generally, it is better if we provide images with different densities (sdpi, MDPI, hdpi, xhdpi, etc.). If I use some library (Picasso, glass, volley, etc.) to retrieve it from the server, do I need to provide the same thing? Or should I only provide the original image and the library convert it to the appropriate size and density for my application?

Note: if I provide images of different sizes or densities, I will not retrieve all images. I just retrieve all image URLs and download them once. Is this better, or is it better to provide an original image URL and retrieve it and resize it to the appropriate size?

resolvent:

It depends on the purpose. For example, if you only need to display the following small profile picture:

You need only small images on the server side, which will reduce memory usage, network usage and picture display time

Another case is a large image. For example:

Music albums and images displayed here must have high resolution

It's even better if you have two types of images on your server, a small image and a large image, and you can receive images according to the situation

Don't worry about the size of the hard disk, which will enable imageloaders to control themselves. The impact of image size on memory and network usage

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>