cordova-save-to-photoalbum-ios-android

iOS & android. Save image file(gif, jpg, png) to photo album.

Usage no npm install needed!

<script type="module">
  import cordovaSaveToPhotoalbumIosAndroid from 'https://cdn.skypack.dev/cordova-save-to-photoalbum-ios-android';
</script>

README

cordova-save-to-photoalbum-ios-android

iOS & android. Save image file(gif, jpg, png) to photo album.

document.addEventListener("deviceready", function(){
    var url = "http://example.com/images/1.gif" 
             || "file:///var/mobile/Applications/1.gif"
             || "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
    cordova.plugins.saveToPhotoAlbum.save(url, function(nativeURL){
        console.log(nativeURL);
    }, function(err){
        console.error(err);
    });
});