react-native-image-crop-picker
react-native-image-crop-picker copied to clipboard
Invalid mime type returned for iOS
Version
Tell us which versions you are using:
- react-native-image-crop-picker v0.36.0
- react-native v0.61.0
Platform
Tell us to which platform this issue is related
- iOS
Expected behaviour
Image response object should contain valid details
Actual behaviour
When selected any image with mime type except for following, mime value always returns "image/jpeg"
- image/jpeg
- image/png
- image/gif
- image/tiff
Example image types to reproduce above issue
- image/heic
- image/x-icon
Steps to reproduce
-
Select an image with mime type "image/x-icon" from gallery using ImagePicker.openPicker.
-
Check mime value returned in response object.
-
Mime type will be returned as "image/jpeg"
// stacktrace or any other useful debug info
Attachments
Same here.
"react-native-image-crop-picker": "^0.35.0", "react-native": "0.63.3",
Hey @ivpusic This issue still exists. All images mime type are returned as "image/jpeg". Any ideas why that could be? "react-native-image-crop-picker": "^0.35.3", "react-native": "0.63.1",
It's related to https://github.com/ivpusic/react-native-image-crop-picker/issues/1656 , init?
After trace iOS native code, I found a workaround to get the correct image type.
Which is the set multiple: true
& maxFiles: 1
ImagePicker.openPicker({
mediaType: 'photo',
multiple: true,
maxFiles: 1,
includeBase64: true,
}).then((images) => {
console.log(images);
});