« Back to demos index

Crop an image to 100x100 pixels

Cropping is implemented as a separated resize strategy in our image resize robot. Just supply "resize_strategy": "crop" to your template json and the image will be cropped to the specified width and height. It will center the image within the specified crop frame and discard any overlapping parts. If the source image is smaller than the crop frame, it gets zoomed. » See full documentation

"steps": {
  "cropped_thumb": {
    "robot": "/image/resize",
    "width": 100,
    "height": 100,
    "resize_strategy": "crop"
  }
}
$(function() {
  $('form').transloadit({
    wait: true,
    autoSubmit: true
  });
});

The form

For demos we allow a maximum of 30MB.

This form is html5-multiupload enabled. If your browser supports it, you can select multiple files and execute the template with them.