64robots / nova-image-cropper

Image Field with built-in cropper for Laravel Nova
57 stars 16 forks source link

Any way to not force an aspect ratio? #16

Closed katyusha-dev closed 5 years ago

katyusha-dev commented 5 years ago

Is there any way to not force any or the original aspect ratio, and crop to whichever size you would like?

beliolfa commented 5 years ago

Hi @trafficfox can you explain a bit more what are you trying to do? a fixed width / height crop by default?

katyusha-dev commented 5 years ago

If I upload an image 6x9 in ratio for example, the cropping selector whether it gets bigger or smaller, stays at 6x9, if I adjust the width then the height moves, if I adjust height, width moves. I want to be able to make the width or height of the crop smaller or larger, without affecting one another.

beliolfa commented 5 years ago

This has been fixed in 1.1.3. Then you only have to call ->aspectRatio(0) in your field declaration.