0

I am working on ionic 4 app which includes swiping of images to left or right. Currently the images are fetched from the server every time which causes a delay in image loading. Could any one suggest an efficient way to cache or preload the images so as to increase the performance of the app by loading images from cache.

Obscure Bug
  • 67
  • 3
  • 5

4 Answers4

1

I think you have to use ionic-img-cache and it works with Ionic Framework (v >= 1.0) or 'ionic-cli' and see this also. All links have an example. Run the first example here and another option is using LoadingController

I_Al-thamary
  • 3,385
  • 2
  • 24
  • 37
1

use ion-media-cache this directive is to store image in the device.

Leonardo Pineda
  • 990
  • 8
  • 10
0

Check this plugin it has the feature of caching image. https://www.npmjs.com/package/ionic-image-loader

Musawer Shah
  • 314
  • 1
  • 9
-3

You Just use the tag it help to lazy load image attribute it's help t

naveen pandi
  • 595
  • 6
  • 14