scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 307 forks source link

Cropit preview max-width #276

Open noiwid opened 6 years ago

noiwid commented 6 years ago

Hi, Thanks for this nice & helpfull plugin. I'm stuck on a problem, I hope I'll find help here.

I'm using cropit to set a few images on a backoffice, and some of theese are big sizes (1920x395px). Unfortunatly, the preview at 1920px get out of window width, and it's not an ideal UX...

I've try different ways to fix it:

Is there a proper way to do this ? (ie: get a preview container at max 1000px for example, to generate an image at 1920px ?)

georgepcrawford commented 6 years ago

I'm using this in a wordpress them, but hope it helps you out. It is getting the window width and height and scaling it based on that.

It won't show the code, so attached the parts that may be of use... slim-image-upload.txt

George

noiwid commented 6 years ago

Hi, thanks for your feedback. Is it done with slimimagecropper ?