Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jquery-cropper

> 编程语言
Open source

A jQuery plugin wrapper for Cropper.js.

731 stars0 likes1 views
WebsiteGitHub

About

A jQuery plugin wrapper for Cropper.js.

jquery-cropper

A jQuery plugin wrapper for Cropper.js 1.0.

  • Demo

Main npm package files

dist/
├── jquery-cropper.js        (UMD)
├── jquery-cropper.min.js    (UMD, compressed)
├── jquery-cropper.common.js (CommonJS, default)
└── jquery-cropper.esm.js    (ES Module)

Getting started

Installation

bash
npm install jquery-cropper jquery cropperjs@1

Include files:

xml

Usage

Initialize with $.fn.cropper method.

xml
css
/* Limit image width to avoid overflow the container */
img {
  max-width: 100%; /* This rule is very important, please do not ignore this! */
}
javascript
var $image = $('#image');

$image.cropper({
  aspectRatio: 16 / 9,
  crop: function(event) {
    console.log(event.detail.x);
    console.log(event.detail.y);
    console.log(event.detail.width);
    console.log(event.detail.height);
    console.log(event.detail.rotate);
    console.log(event.detail.scaleX);
    console.log(event.detail.scaleY);
  }
});

// Get the Cropper.js instance after initialized
var cropper = $image.data('cropper');

Options

See the available options of Cropper.js 1.0.

javascript
$().cropper(options);

Methods

See the available methods of Cropper.js 1.0.

javascript
$().cropper('method', argument1, , argument2, ..., argumentN);

Events

See the available events of Cropper.js 1.0.

javascript
$().on('event', handler);

No conflict

If you have to use other plugin with the same namespace, just call the $.fn.cropper.noConflict method to revert to it.

xml

Browser support

It is the same as the browser support of Cropper.js 1.0. As a jQuery plugin, you also need to see the jQuery Browser Support.

Contributing

Please read through our contributing guidelines.

Versioning

Maintained under the Semantic Versioning guidelines.

License

MIT © Chen Fengyuan

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptcroppercropperjsimage-cropperimage-processing

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言