React-native-image-crop-picker: Uploading multiple photos disregards maxWidth/Height props

Created on 4 Dec 2017  路  8Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.18.1
  • react-native v0.50.3

Platform

Tell us to which platform this issue is related

  • Android 8.0

Expected behaviour

When selecting multiple images, they should follow the compressImageMaxWidth compressImageMaxHeight rules.

Actual behaviour

When selecting multiple images, they should follow the compressImageMaxWidth compressImageMaxHeight but don't and instead end up uploading them to original size which for a startup, is bad.

Steps to reproduce

  1. Select multiple photos in your file browser window
  2. Hit Ok
  3. That's it, make sure to have the aforementioned props to see the bug in action.

Most helpful comment

It is not working for me:

{
      includeBase64: true,
      cropping: false,
      // width: 640,
      // height: 640,
      multiple: true,
      compressImageMaxWidth: 1200,
      compressImageMaxHeight: 1200,
      compressImageQuality: 0.8,
      mediaType: 'photo',

    }

All 8 comments

do you have some time to investigate this?

No unfortunately, I don't. We are on a tight schedule and we need this app to be done very soon.

@ivpusic I have the same problem. What additional information can I give you?

@ivpusic I have tracked the problem down, photos are being resized but just to the wrong dimensions. Its caused by false calculations in the compression library.

Its fixed in the fork https://github.com/aftabsikander/Compressor and a pull request has been made already https://github.com/zetbaitsu/Compressor/pull/82. For people with the same problem, you could temporary use my fork of react-native-image-crop-picker https://github.com/ChrisLahaye/react-native-image-crop-picker.

@andrewfluck Can you please check above PR and if it is fine, can you please merge it with the library.
Normally user uses the latest OS. Now if it is not working on such device then there is no benefit to use this library.

It is not working for me:

{
      includeBase64: true,
      cropping: false,
      // width: 640,
      // height: 640,
      multiple: true,
      compressImageMaxWidth: 1200,
      compressImageMaxHeight: 1200,
      compressImageQuality: 0.8,
      mediaType: 'photo',

    }

Still experiencing similar issue as well, that PR request seems to have been ignored. Project might be abandoned?

if anyone is looking for a mickey mouse solution:

https://github.com/ivpusic/react-native-image-crop-picker/issues/604#issuecomment-429521266

I've created a PR, which I think may relate to this issue. Feel free to check it out and leave feedback 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Phenek picture Phenek  路  3Comments

leelandclay picture leelandclay  路  3Comments

Martian2Lee picture Martian2Lee  路  3Comments

aterribili picture aterribili  路  3Comments

co-de picture co-de  路  3Comments