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

response.mime returned is dependent on options.multiple #1656

Open Caundy opened 3 years ago

Caundy commented 3 years ago

Version

Tell us which versions you are using:

Platform

Expected behaviour

The detection of image's MIME type should be consistent, regardless of whether the picker was opened with { multiple: true } or with { multiple: false }

Actual behaviour

MIME type (image.mime) returned for heic images is being returned as image/heic when image picker is being opened using { multiple: true }. MIME type (response.mime) returned for heic images is being returned as image/jpeg when image picker is being opened using { multiple: false }.

Sidenote

Thanks for this library :)

I think that the MIME type information could be better covered in readme, which lists (image/jpeg, image/png) as possible values of response.mime. On a first glance the list might appear to be a complete one, due to lack of ", ..." ", etc" or other indicator of other possible types. Additionally, readme could include a complete list of returned MIME types as a separate subsection.

The typings file comments mime as Selected image MIME type (image/jpeg, image/png, etc). which better portrays the array of possible values. With image/heic added as a possible type in v0.36.1 and returned as image/jpeg, it would make sense to include that type in response.mime's description, too :)

qodot commented 2 years ago

same issue on me

wmatyjanomtek commented 2 years ago

Same here. Is it solved? How do you deal with it guys? By hand?

econnerty commented 1 year ago

Single images are forced to jpg