New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect orientation on image taken with mobile device. #147
Comments
I'm not sure this is related to the component. The only place that might be related to this is here: https://github.com/okonet/react-dropzone/blob/master/src/index.js#L92 and this is also a browser feature. I've found this StackOverflow article: http://stackoverflow.com/questions/29752779/how-can-i-preview-image-before-uploading-with-the-correct-orientation-with-javas I'd accept a PR that fixes it, but I'd rather keep the surface of this library minimal. |
I was just curious because Dropzone.js added a fix for this on the client side about 29 days ago. No worries, I understand if we want to keep this as minimalist as possible. For anyone who finds this in the future what I'm going to do is just use https://github.com/blueimp/JavaScript-Load-Image in the onDrop and it automagically reorients the image based on the exif. |
👍 |
If you are storing file in S3, you can use S3 item creation event to trigger Lambda to auto orient image using gm. |
@camrongodbout can you explain how you ended up the JavaScript-Load-Image package in React? if I follow the package instructions and add the package as a script tag in index.html file, then I cannot use loadImage because it is undefined in my specific component. Also, I cannot import the package in my Component properly. Any quick tips would be greatly appreciated! |
@Andriy-Kulak I created a wrapper for that purpose. |
@Andriy-Kulak you can use this repo: (https://github.com/blueimp/JavaScript-Load-Image)
then:
|
@manoj-makkuboy - |
Could you please let me know how can we implement this |
This is pure javascript, how can we use this in react? |
Hi Manoj, trying your library, in onDrop method, seems not working here.. if you provide example, more appreciated. Thanks. |
I'm taking a picture with my iPhone 5s and trying to upload a file on my desktop, the images orientation is incorrect.
The text was updated successfully, but these errors were encountered: