🇬🇧 English

🖼️ ImageCropper

Lightweight, pure JavaScript image cropping library - No dependencies, easy integration

⚡ Lightweight & Fast 🎯 No Dependencies 💡 Easy to Use
View Demo

✨ Core Features

🚀 Quick Start

JavaScript
// Create a cropper instance
const cropper = new ImageCropper('#container', {
  width: 500,
  height: 500,
  cropMode: 'free'
});

// Load an image
await cropper.loadImage('path/to/image.jpg');

// Export the cropped image
const base64Data = cropper.export('image/jpeg', 0.9);
console.log(base64Data);
HTML
<!-- Include library file -->
<script src="image-cropper.js"></script>

<!-- Create container -->
<div id="container"></div>

📚 Main APIs