Size and crop options

With our on-the-fly processing, you can manipulate image size and crop options, adjust resizing behavior, and set a background color.

  • Resize image proportionally to fit into given dimensions, preview
  • Resize image to fit into specified dimensions, resize
  • Crop image to specified dimensions using specified offsets, crop
  • Scale image and crop it where needed, scale_crop
  • Adjust resizing behavior, stretch
  • Define fill color to use with crop, setfill



Reduces an image proportionally for it to fit into the given dimensions in pixels. If dimensions are not specified, default limits are used, 2048x2048 pixels.




Resizes an image to fit into the specified dimensions. With just a single linear dimension specified, preserves your original aspect ratio and resizes an image along one of its axes.




Crops an image using specified dimensions and offset. If no offset value is passed into the operation, the top-left image corner is used by default.

Original image.



If given dimensions are greater than the ones of the original image, the image is rendered inside a color-filled box. The color of that box can be changed via the setfill operation.



Scales down an image until one of its dimensions gets equal to some of the specified ones; the rest is cropped. This proves useful when your want to fit as much of your image as possible into a box. Let us compare the two resizing methods:

Requested size.

Adjusted size.
No distortion.

Requested size.
No distortion.



Sets the resize behavior when a source image is smaller than the resulting dimensions. The following modes can apply:

  • on — stretches an image up, the default option.
  • off — forbids stretching an image along any dimension that exceeds image size along any of its axes.
  • fill — does not stretch an image, the color-filled frame is rendered around instead, the default fill color is used.






Sets the fill color used with crop or when converting an alpha channel enabled image to JPEG. The operation uses hexadecimal notation to define colors.




We’re always happy to help with code, integration, and other stuff. Search our site for more info or post your question in our Community Area.