Cropper: Max image and canvas size

Created on 21 Sep 2015  路  4Comments  路  Source: fengyuanchen/cropper

Hi!

First, thank you for creating such an excellent cropping tool! Your source code is beautiful. My question: Is there an easy way to set the max width and height of the image to crop? When a large file is uploaded the cropper modal becomes too large for the screen.

John

Most helpful comment

Just limit the size of the image container...

All 4 comments

I have same problem

I found the solution, you must set for container height:

<div id="cropper-example-2" class="edit-photo-container">
  <img id="cropperImg" src="~/Content/images/no-photo.jpg" alt="Picture">
</div>
.edit-photo-container {
  height: 600px;
}

That doesn't quite do it for me. I'm using the modal format very close to the example https://github.com/fengyuanchen/cropper/tree/master/examples/crop-avatar

Just limit the size of the image container...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nchase picture nchase  路  5Comments

Mafial picture Mafial  路  8Comments

airtwister picture airtwister  路  7Comments

naglalakk picture naglalakk  路  5Comments

Kendokai picture Kendokai  路  4Comments