Ionic Offline App with a system update via Wordpress

Hi, I would like to create an ionic 3 app that can work offline.
Basiclly I want it to get posts from a Wordpress website via WP-API when we click on the option “Update the app” (a button in the app for exemple) and then store everything locally (Wordpress posts, images, videos) so the app can run offline on a tablet without wifi to display the posts (like a portfolio).

I need some advices and plugins before I start to develop it.

After my researches, i found that the better option is to use SQLite to store the posts (text) locally.

But my question is how can I store images/videos locally?
Is there a limit of space allowed for an ionic app to store media?

Thank you in advance guys!

You can store files using the file plugin.

Depending on how many images you have you could store that stuff in the local storage using the storage plugin.

That’ll give you key value type storage. That’s also pretty cool as it works directly within the browser… with usual limits like 10mb or whatever so really only for testing and debugging.

Thank you Judgewest2000!

So I can download images on the device with the file plugin (like in /assets) and then display them like right?

You probably don’t want them in the assets folder, that’s for the developer only.

But yes you can download the files however you do, and store them and retrieve them at will.

You can see all the different potential storage areas here…

1 Like

Thank you! It will help me a lot.