fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

How to stop images stretching to container height #917

Closed andywr closed 7 years ago

andywr commented 7 years ago

Hello,

First off this plugin is awesome so thanks for all your hard work.

I am having a small problem though. I am setting the minCropBoxWidth, minCropBoxHeight, minContainerWidth and minContainerHeight. Which all seem to work as expected.

However when i load an image in which is smaller than the minContainerHeight the image/canvas is stretched until it either fits the minContainerWidth or the minContainerHeight (whichever comes first).

Is there a workaround for this, or a setting that i am missing. I would like to be able to work on the original image, even if it is smaller than specified cropBox/container dimensions.

Cheers Andy