Base64 image rotation issue

This has been a bit of an issue for a sometime and I’m just getting around to digging in here but we have an option to upload photos via our app. The workflow is like this

  1. Select a file from device or Camera
  2. If they are happy with it, upload the photo ( under the hood we base64 the image and send to our servers)

Looking deeper into this, it appears the base64 encode causes issues but it is not but base64 in general. Is there a way to read exif data from the file? I suppose I could store that and send it up to the server and do the rotation there…


In case anyone has a similar issue and maybe a better way to handle the upload… Basically I’m having to read the request header and if its IOS I do a rotation because its like a 90% chance IOS will rotate the image (thanks IOS)

I think the next version I may grab the image dimensions and send that up and if width and height dont match, rotate…

1 Like