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

Images shrink and flip in the wrong orientation on some Android devices #189

Open
ysabri opened this issue Apr 20, 2023 · 3 comments
Open

Comments

@ysabri
Copy link

ysabri commented Apr 20, 2023

We've been encountering this weird bug on some devices where this happens to images:

Landscape3-rte0bz

This was the Landscape_3 image from the https://github.com/recurser/exif-orientation-examples repo

The two devices we know this happens on are Xiaomi and Huawei ones and I was able to reproduce this reliably on a Huawei P30.

I don't understand how or why this happens exactly and it also happens with PNGs (I wasn't able to get the original files).

When I set the exifOrientation: 1 in the options, it fixes the issue, but I don't want to do that since I would like it if we can respect the orientation of the images the user uploads.

This is another image that this happens to as well and based on the software I use (InfraView), it doesn't contain exif information:

Laptop_with_code

The result after compression:

Laptopwithcode-rte1xi

@ysabri
Copy link
Author

ysabri commented May 5, 2023

Hi @Donaldcwl,

I understand if you aren't able to look at this, I can help.

Before I try, can you please give me your thoughts about it? Where should I start and what to keep in mind while doing so. I can reliably replicate this through devices on browserstack, so I just need some direction on what to do or look for to figure out the root cause.

@dcruz1990
Copy link

Do you still having this issue?

@ysabri
Copy link
Author

ysabri commented Sep 11, 2023

@dcruz1990 Not after I hardcoded the exifOrientation to 1.

I don't know if that is a good solution though

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