onurzorluer / react-image-file-resizer

Resize Local Images with React 🌄 🌅
MIT License
317 stars 41 forks source link

Minor issue: maxWidth and maxHeight are flipped #7

Closed zehawki closed 4 years ago

zehawki commented 5 years ago

Thanks for this excellent library, using it live here. https://www.nextelection.com/home

I think the param order should be:

Resizer.imageFileResizer( file, //is the file of the new image that can now be uploaded... maxHeight, // is the maxHeight of the new image maxWidth, // is the maxWidth of the new image

I've tested with 800,1000 and got an image which is width = 1000. Then I tested with 1000,800, and correctly got an image which is width = 800.

onurzorluer commented 5 years ago

i will check it out immediately.

nadunc commented 4 years ago

@onurzorluer I have opened a pull request #14 about this issue