Cropper.js is a JavaScript component for cropping images in web pages, with customizable UI and optional modular imports.
Overview
Cropper.js provides client-side image cropping for websites and web applications. The v2 line focuses on a maintained major version branch distinct from the older v1 tree.
The library is customizable, meaning you can adjust the cropping UI and behavior, and extensible when you need extra hooks or behavior beyond the defaults. It also supports on-demand imports so you can include only the pieces you need rather than loading the entire package.
A playground and getting-started material support trying interactions before integration. The package is positioned as a focused image cropper rather than a full image editor, aimed at developers embedding selection rectangles, aspect ratio control, and export of the cropped region in browser-based workflows.
Versioning follows semantic versioning conventions, and related companion libraries are available for users comparing adjacent tooling.
Key features
- In-browser image crop selection
- Customizable cropper appearance
- Extension points for extra behavior
- Modular on-demand imports
- Interactive playground on project site
Use cases
- Profile or upload image cropping
- Avatar selection in web forms
- CMS media preparation in the browser
- Photo editor crop step in web apps