Fetch all images from the device, convert them to base64 thumbnails and output the thumbnail, id and real path. Make the plugin call the javascript callback everytime an image is processed.