Skip to content

Image Optimization

Tips and Tricks on Image Optimization on App

  1. Use Assets small size or compress them.
  2. Use CacheNetworkImage_ce (community edition as it has some bug fixes and utilize the loading and error builder on it, for better user experience. Also it won’t call for same image twice through out the app running cycle) but after the app is close it re-request for the image, for that one optimization on your end can be done as saving on documentDirectory and saving on sharedpreferences, if image exists in sharedPreferences show from device other wise request network and save. or Can use Nosql database for that.
  3. Also, always use small size images for thumbnail at max use 400x400(in max cases 200x200 will do the job for thumbnail , and only when the thumbnail is click then request for original image on demand.(ask your backend guy to send both type of image, if in case you’re getting image from third party and no direct control then use https://wsrv.nl/, it will make small size on cloud but it has request limit per hours see, that, for repeated image cache on system.