npm / cropperjs
cropperjs
What changed in cropperjs 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
16 new APIs and options3 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcropperjs 215 changes
New APIs and options 9
Adds border radius support for selection and shade elements.
Adds the createCropper function for creating a new Cropper instance.
Adds the maxInset property to cropper-image.
Adds the minInset property to cropper-image.
Adds the zoomAroundCenter property to cropper-image.
Adds the maxInset property to cropper-selection.
Adds the minInset property to cropper-selection.
Adds the resizeAroundCenter property to cropper-selection.
Adds the zoomAroundCenter property to cropper-selection.
Behavior and default changes 3
Enhances resize handling with initial dimensions tracking.
Enhances selection handling for non-resizable elements.
Improves selection coverage and boundary handling.
Fixes and other changes 3
Fixes the element staying 0×0 when src is set after connect.
Handles the image load event for complete images.
Preserves explicit selection dimensions on initial coverage.
cropperjs 112 changes
New APIs and options 7
Adds rounded crop boxes and canvases.
Adds an option to move and resize the crop box relative to the drag start point.
Adds an option to resize the crop box around its center.
Creates a new Cropper instance without the new operator.
Adds an error event when the target image fails to load.
Adds a beforeDraw option for applying canvas filters or custom drawing before the cropped image is rendered.
Adds an option to zoom around the center of the cropper.
Fixes and other changes 5
Ends an active crop when the window loses focus, such as when releasing the mouse outside an iframe.
Fixes crop box creation when a diagonal drag begins with movement along only one axis.
Fixes crop box jumps when resizing past the opposite edge with minimum dimensions set.
Fixes squished images with EXIF rotation when image-orientation: none is set.
Fixes tiny negative offsets returned due to floating-point errors.