Phonegap app - How to get images from Json Web Service Response?

I need to get images from server side in a Phonegap App. This app uses a Json Web Service to get data from the a .NET application (Server). I need to get images via web services and store in some location of device (temporally). Im asking the first thing. Im thinking what the way to do that is taking via ws the urls of the images, but I need then a way to use the url of image to"download" or get it via url and save to some object or something in Javascript (I guess) for in the case that the device lose the internet connection, the app remains the images getted.

What do you think about this approach and do you know how I can do this way?



As per my understanding for your question you want to download the image... For this you can make use of Cordova file plugin. Secondly you can keep the image inside your project as well.

Need Your Help

Launching Chrome and debugging from within Visual Studio Code

javascript google-chrome debugging visual-studio-code

I am using Visual Studio Code to debug some front-end javascript (for a Wordpress plugin). I am having trouble configuring the launch.json file correctly.