Examples
Async
Upload new image
Default async upload.
Upload and edit existing image
With manual remove button.
// load this code when the document has loaded
document.addEventListener('DOMContentLoaded', function() {
// get a reference to the remove button
var button = document.querySelector('#remove-button');
// listen to clicks on the remove button
button.addEventListener('click', function() {
// get the element with id 'my-cropper'
var element = document.querySelector('#my-cropper');
// find the cropper attached to the element
var cropper = Slim.find(element);
// call the remove method on the cropper
cropper.remove();
});
});
Edit existing image only
With altered label values.
Note that the “edit”, “download”, “remove”, “upload” and “rotate” labels are invisible as Slim uses icons for these buttons. It will show the button title when hovering over the button.
Read more on labels in the documentation
Upload and remove images
With remove image from server script.
Sync
Accepts only jpegs and gifs.