I just want new method for fast image upload. Can you tell us the best way for you to know? I want the images to be loaded at the same time as xml. :)
Well, image loading and rendering is time & resource consuming process. Rendering image and then displaying faster can depend on multiple factors :
Image resolution
Image size
Network strength
Android device
Algorithm used by Library for rendering
Hence, you should consider above mentioned points for image rendering on Android device.
Moreover, if you are unsatisfied with Picasso library you can try Glide
It is one of the most efficient libraries available in the market today.
Or you can also use Fresco
In addition to using these libraries, you can also improve your codebase for image loading by following below mentioned points:
Save images or image urls
to your local cache directory and avoid making API call each time for loading an image. You should only make API call if imageurl
has been modified in the API response.
Show proper placeholder
image in case of error in image loading/rendering.
Show proper default placeholder
image when image is unavailable/missing .
Use proper images resolutions
. Like if you have to show a thumbnail image, then you should show thumbnail image and not full resolution image. Multiple resolutions for an image can be can be thumb, low, normal, high and they should have separate urls.
Use compressed images.
Blur thumbnail image before loading actual image.
Glide is very good about it. However, because the event shows shape according to the size and intensity of the photo, it will be healthier for you to optimize it on the backend side.
You can read about it here: Glide Vs Picasso
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.