How to share a watermark-ed image to instagram

According to this documentation https://www.npmjs.com/package/watermarkjs#usage, you can’t apply this method on a Base64 image, you can only apply it on a file (local or remote) ! You’d might want to save temporaly an image file to transform this one.

1- Modify your cameraOptions to save a physical file, to select the destinationType (CF https://ionicframework.com/docs/native/camera/#CameraOptions explaining… FILE_URI:1 to return image file URI, or NATIVE_URI:2 to return image native URI : You’ll better to generate a FILE_URI because you need a file, this previous post can help you on this part : Image preview not available using fileuri

2- You know the uri and you can apply the watermark method on the saved temporary file.

3- When getting the promise result, share the image, apparently a file is needed (CF https://github.com/vstirbu/InstagramPlugin#angularjsionic)

4- Now you have only to remove the temporary file to clear all, by using the File native component (https://ionicframework.com/docs/native/file/#removeFile).

Hope it helps you !