Skip to content
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

unable to upload new file with rotation EXIF #148

Open
theonlybenjamin opened this issue May 2, 2022 · 8 comments
Open

unable to upload new file with rotation EXIF #148

theonlybenjamin opened this issue May 2, 2022 · 8 comments

Comments

@theonlybenjamin
Copy link

hello, I want to upload the new file with EXIF ​​​​rotation to my server, it does not show me any error in the console, but my file is uploaded without EXIF ​​rotation. here's my code
image

@Donaldcwl
Copy link
Owner

This lib reads the EXIF rotation information and rotates it accordingly. It is normal that the output file does not have EXIF information.

@theonlybenjamin
Copy link
Author

Yes, want i want to do is upload the rotated file, and dont need the exif information on the file, i just need the rotated file but it(the lib) doesnt rotate the file.
The exif rotation number is 6 but my image arrives like this to the server(original image, withouth rotation)
image

@theonlybenjamin
Copy link
Author

maybe im doing something wrong, please I would really appreciate your help

@Donaldcwl
Copy link
Owner

@theonlybenjamin It seems that your image file is png, you may provide the exifOrientation value in the option. For example:

options = {
  maxSizeMB: 1,
  useWebWorker: true,
  exifOrientation: 6
}

We only detect EXIF rotation information for jpg images at the moment.

@theonlybenjamin
Copy link
Author

its jpg image, give you some pictures:
this is the file:
image
uploading the file:
image
and this is the code:
image
Even if i harcoded the exifOrientation property with 6, it doesnt rotate it

@Donaldcwl
Copy link
Owner

Can you zip the jpg file and upload it here?

its jpg image, give you some pictures: this is the file: image uploading the file: image and this is the code: image Even if i harcoded the exifOrientation property with 6, it doesnt rotate it

@theonlybenjamin
Copy link
Author

of course, there you go
test.zip

@Donaldcwl
Copy link
Owner

Donaldcwl commented Jun 5, 2022

image
test_result.zip
@theonlybenjamin I cannot reproduce your issue, the lib detects it's exifOrientation value is 6 and rotated it accordingly.
You may try it out in https://donaldcwl.github.io/browser-image-compression/example/basic.html
I have upload my test_result.zip here for your reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants