ionic-image-loader
ionic-image-loader copied to clipboard
Loading offline and make available without internet
My app is a completely local app. So when I sync data from the server I'm preloading the images from JSON and later when the app is offline it should load the image from cache. But I'm not getting the image when I'm offline.
This is how I preload
this.imageLoader.preload('http://www.lanlinglaurel.com/data/out/41/4256504-high-resolution-image.jpg');
http://www.lanlinglaurel.com/data/out/41/4256504-high-resolution-image.jpg
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
Thanks
What version of ionic-image-loader are you using?
Not sure if it is linked, I also found some "issue" with the offline mode.
If my network is bad, I can or cannot get the image from the cache instantly, it feels like the cache is not working for the whole app, and sometimes, getting my image from the cache fells like it is close to my network speed... But if I put my phone in "plane mode", the cache is working fine...
I tried to see where it comes from, and when it doesn't work, the getImagePath will never resolve, and for ever. It always happen when I am in the subway with a really bad network (Edge, or Edge but no bandwidth )
@ihadeed Any idea ? I have it all the time when using the subway and Edge/bad network (but it is working well with plane mode..)
@ihadeed For me it was again the platform.ready event which was not fired... I replaced again by the device ready, and I do not see anymore the issue !
@tgensol Hi there, Sorry but could you explain how you fixed the problem exactly? It s a bit confusing to me. I do have the same problem, with images not loading when the network is poor. The images are not shown afterwards when the network gets better, resulting in a very poor experience. I m curious to know how you fixed that. Thank you
Hi @matthieu80, do you have the last version ? It should be working well