javascriptreactjsreact-nativeexpoexpo-camera

expo-camera keep front facing photo mirrored?


I am using the expo-camera library to take a selfie image. The preview is mirrored but the saved image is reverted to the normal orientation. How do I prevent this effect from happening (I want the image to stay mirrored), or if I can't, how can I flip my image horizontally?

Here's what I have so far for taking pictures:

const takePic = async () => {
  if (cameraRef) {
    const photo = await cameraRef.current.takePictureAsync();
    setFrontProfile(photo.uri);
  }
};

Solution

  • Use ImageManipulator to flip it.