How to read images from the 'www/' folder using cordova-plugin-file?

Hi, i try to make a gallery app and for this purpose i created a folder called ‘media’ inside the ‘www’ folder, but i can’t get it’s content. I tried window.resolveLocalFileSystemURL but i only get an error, even the plugin is installed properly. Is there any way to read the complete content of a folder within the ‘www’ folder? My goal is that it loads all the images dynamic, that everytime i create a picture in ‘media’ it the app loads it on start.