Expo ImagePicker or ImageManipulator rotating image on Android


#1

Hi, I’m using the ImagePicker to take photos in my app. When the photo is taken, I use ImageManipulator to compress it (for some reason, the quality parameter in ImagePicker.launchCameraAsync doesn’t do anything). After processing, images taken on Android devices are rotated 90º to the left. No idea why this is happening. Cheers!

The code looks like this:

      const photoData = await ImagePicker.launchCameraAsync({
        allowsEditing: false,
        base64: false,
        exif: true,
      });

     (...)

     const manipResult = await ImageManipulator.manipulate(
        photoData.uri,
        [],
        {
          compress: Platform.select({android:0.75,ios:0.50}),
          format: 'jpeg',
        }
      );


#2

Guys?


#3

Hi,

I have same problem, the quality parameter in ImagePicker.launchCameraAsync doesn’t do anything and android rotated 90 the image.

Did you resolve problem ?


#4

Heads-up that we had a similar-sounding issue with ImageManipulator, documented here: https://github.com/expo/expo/issues/2512. It was present in (at least) Expo 30 and on Galaxy S devices. However, I just checked in Expo 31 and the issue appears to be resolved.


#5

Yess with expo 31 the problem resolved.


#6

Hi @kevin.vuillemin, didn’t have the chance to upgrade to sdk 31, still on 30. Did you test on expo 31 and it’s solved? Yay :sunny:


#7

Yes, i don’t have problem anymore with Expo 31 in android. =)


closed #8

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.