Cropper.js is an image uploading and cropping tool that can easily be added to your website.
The current version supports cropping and automatic resizing to given dimensions, as well as exporting the result.
The aspect ratio of the crop is fixed and files with a side longer than options.limit
are resized on upload.
This project is open source and still under development, so any additions or changes are welcome. Just submit a pull request and I will take a look at your contribution!
The library is written in ECMAScript 6, so make sure that target browsers support it, or use Babel for backwards-compatibility.
Documentation for the Uploader
and Cropper
classes is available.
You can experiment with the code over on Codepen.
The example.html page contains a basic image cropper.
This project is licensed under The MIT License (MIT).
See accompanying LICENSE file.