When attempting to upload an image file stored on an iPhone running IOS 7 on the Safari browser, regardless of the original image format, the selected image files are always converted to a JPEG.
<input type="file" accept="image/*">
I have attempted to be more specific with the accept
attribute such as image/png
with this fiddle but have not had any luck.
Are there any known solutions, hacks or workarounds to preserve the original image file when uploading?
You can't. Mobile Safari for iOS is very limited when it comes to uploading. Your image will always be converted to JPEG with lower quality than the original image.
"Solutions" :
The obvious one is to go native (which probably beats the purpose of this question but I thought I'll throw it in anyway.)
The more "reasonable" solution is to ask the user to give you a link to the original picture (dropbox for example) or something of that sort. Still, not really a solution but like I said, currently there aren't any good solutions for this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With