Inline image editor with interactive crop
Rotate +/-90 deg, flip H/V, and interactively crop with 8 drag handles (corners + edges). Optional aspect-ratio lock, touch + mouse unified via pointer events, Esc to exit crop mode. Edits compose destructively: rotate -> crop yields the crop of the rotated image.
Pure client-side. No server round-trip until you explicitly upload - everything happens in-browser via
Canvas + File. Works offline.
Edits happen entirely in the browser. The edited file lands in the queue below - only sent if you click Upload.
JavaScript API
// Opens the editor modal. Resolves with an edited File; rejects on cancel.
uploader.openImageEditor(file, {
aspectRatio: 16 / 9, // omit for free-form
outputType: 'image/jpeg',
quality: 0.9
}).then((edited) => {
uploader.addFile(edited);
});Keyboard shortcuts
- Esc - exit crop mode, or cancel the whole editor
- Drag corner handle - resize on two axes (
nw/ne/sw/se) - Drag edge handle - resize on one axis (
n/s/w/e) - Drag inside the box - move the crop rectangle
Combine with the image pipeline
Editor output is a plain File - feed it through imageResize, imageCompress, or watermark options for a full client-side pipeline before upload.