cropit icon indicating copy to clipboard operation
cropit copied to clipboard

Cropit preview max-width

Open noiwid opened this issue 7 years ago • 2 comments

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:

  • set a max-width to the .cropit-preview containers.... issue : my container is no more at the same ratio of my area, as the 395px stays active
  • calculate new width/height for the preview, but it's impacting the image generation, it's then based on the new small size of my preview area...

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

noiwid avatar Jan 08 '18 14:01 noiwid

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

georgepcrawford avatar Jan 08 '18 20:01 georgepcrawford

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

noiwid avatar Jan 18 '18 13:01 noiwid