3

I'm creating a web mobile app with jQuery, javascript and HTML. My app generates an image (img HTML component) and I want to save it on the mobile device's photo album. Is that possible?

Thanks!

CarinaPilar
  • 1,054
  • 2
  • 13
  • 20
  • Think it's successfully answered here: http://stackoverflow.com/questions/7951326/save-image-to-users-disk-using-javascript – Anja Mar 12 '16 at 15:03

2 Answers2

2

The user would have to save the image themselves. (i.e. in iOS, hold down on the image until they get the save to camera roll button). There is no way for a webapp to save images programmatically.

CJT3
  • 2,788
  • 7
  • 30
  • 45
  • Hummm, I imagined, so bad... So I will have to at least transform the div that I'm generating the img on a real image... Ok! Thanks! – CarinaPilar Sep 16 '13 at 01:20
0

Web Share API level 2 is required for this. Not available in iOS 14, and is available in Chrome Android/Windows right now.

https://web.dev/web-share/

Morteza
  • 2,097
  • 5
  • 28
  • 47
  • I tested the demo link they provided (https://w3c.github.io/web-share/demos/share-files.html) on an iPhone 12 emulator with iOS 14, in Safari, and I get `Error: Unsupported feature: navigator.canShare()`. Tried an iPhone 11 with iOS 14 (Safari) as well. – Paul Apr 19 '21 at 17:45
  • 1
    Actually, I didn't read the page correctly - looks like sharing **files** is not supported for Safari/iOS yet. – Paul Apr 19 '21 at 17:52
  • Yeah @Paul, thank you. Updated my answer. – Morteza Apr 20 '21 at 06:51