The size of the cropper inherits from the size of the image's parent element (wrapper), so be sure to wrap the image with a visible block element. If you are using cropper in a modal, you should initialize the cropper after the modal is shown completely. Otherwise, you will not get the correct cropper. The outputted cropped data is based on the original image size, so you can use them to crop the image directly. If you try to start cropper on a cross-origin image, please make sure that your browser supports HTML5 CORS settings attributes, and your image server supports the Access-Control-Allow-Origin option (see the HTTP access control (CORS)). You may set cropper options with new Cropper(image, options). If you want to change the global default options, You may use Cropper.setDefaults(options). Define the view mode of the cropper. If you set viewMode to 0, the crop box can extend outside the canvas, while a value of 1, 2, or 3 will restrict the crop box to the size of the canvas.
Features
- Supports zooming
- Supports rotating and scalling
- Supports multiple croppers
- Supports to crop on a canvas
- Supports to crop an image in the browser-side by canvas
- Supports to translate Exif Orientation information
- Cross-browser support