vanilla-image-cropper icon indicating copy to clipboard operation
vanilla-image-cropper copied to clipboard

Is there a way to set a fixed aspect ratio to the cropper? 🤔

Open sntlln93 opened this issue 4 years ago • 1 comments

The cropper's outline its allways square unless the fixed option is set to false. I want to set the cropper to a fixed aspect ratio, can i do that? If not, im willing to make a PR, just need to someone point me in the right direction regarding what files should i take a look.

sntlln93 avatar Jun 14 '21 10:06 sntlln93

@sntlln93 Thanks for your question!

At the moment this is not possible, I built this library for a couple of small usecases a while ago. However, I will most likely do some work on it in the coming weeks to introduce some much-needed improvements (such as usage of css variables for theming, more modern build approach, additional configuration options, etc).

I'll be noting this one down to take in as an improvement.

Is there a format you would suggest for the ratio configuration (eg: '16:9')?

peterver avatar Jan 18 '22 12:01 peterver