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.
Asked
Active
Viewed 7,276 times
0
-
https://ionicframework.com/docs/api/img If you can lazy load the images. – arif08 Dec 06 '19 at 04:02
-
See this:https://github.com/zyra/ionic-image-loader/tree/v4 – I_Al-thamary Dec 06 '19 at 06:45
4 Answers
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
0
Check this plugin it has the feature of caching image. https://www.npmjs.com/package/ionic-image-loader

Musawer Shah
- 314
- 1
- 9
-
used this but this is not working as expected in ionic 4, in ionic 3 it works fine. – Obscure Bug Dec 06 '19 at 06:46
-
for ionic v4 use this plugin https://github.com/zyra/ionic-image-loader/tree/v4 – Musawer Shah Dec 06 '19 at 07:03