How to make a file input upload the original image file instead of forcing conversion to jpeg on IOS
Asked Answered
B

1

13

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?

Baillieu answered 28/12, 2014 at 1:51 Comment(0)
E
8

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.

Elmoelmore answered 2/1, 2015 at 13:0 Comment(2)
This sucks. Now it is 2017 with ios11 and this is still not fixed. Is there some way to at least detect which images are converted?Almost
Its 2020 now, and this thing is probably here to stay. In addition to converting the image data, it also strips EXIF from it, guess whats how you may detect it not being an original image (it also strips EXIF when resizing JPEGs, too), but hey, i actually want that EXIF :-/Bays

© 2022 - 2024 — McMap. All rights reserved.