How to save image in Photo gallery from URL

I’m trying to save image in photos Gallery app(default app in mobile) from image URL, but not able to do it in capacitor. I tried with file system its working in Android but in iOS it allowing to store image inside the app only, so please suggest me the best way.