If you connect to the above snack url and press the “Upload Image” button in the ios emulator to select the same picture as the original picture in the above comment, you can reproduce the above situation.
This appears to be intended behavior. The Image component defaults to the resizeMode of cover, which means it zooms in on the image so it can fit within the size you give it. If the image is not the same aspect ratio as the Image component’s height and width, some of it will be cut off. You can change the resizeMode to contain to make the entire image fit within the height and width. You can read more about this property here: Image · React Native
To resolve this issue, I upgraded the version of expo-image-picker to 14.0.1, and now HEIF pictures fail to pick.
Error: Failed to read picked image
→ Caused by: Cannot load representation of type public.jpeg
at construct (native)
at Wrapper (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=im.jobda.app.newrrow:20649:64)
at construct (native)
at _createSuperInternal (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=im.jobda.app.newrrow:99085:322)
at call (native)
at CodedError (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=im.jobda.app.newrrow:99093:26)
JPEG photos are picked well.
Am I the only one who has a problem?
The expo version is 47.0.0 and the expo-image-picker version is 14.0.1.