ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.13k stars 1.56k forks source link

Invalid mime type returned for iOS #1551

Open Nirodha26 opened 3 years ago

Nirodha26 commented 3 years ago

Version

Tell us which versions you are using:

Platform

Tell us to which platform this issue is related

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"

Example image types to reproduce above issue

Steps to reproduce

  1. Select an image with mime type "image/x-icon" from gallery using ImagePicker.openPicker.

  2. Check mime value returned in response object.

  3. Mime type will be returned as "image/jpeg"

// stacktrace or any other useful debug info

Attachments

image

luisaverza commented 3 years ago

Same here.

"react-native-image-crop-picker": "^0.35.0", "react-native": "0.63.3",

nishanttatva commented 2 years ago

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",

wmatyjanomtek commented 2 years ago

It's related to https://github.com/ivpusic/react-native-image-crop-picker/issues/1656 , init?

BCT-Barney commented 11 months ago

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);
});