Supported processing options

resize

{
  resize: {
    resizing_type: String || Symbol,
    width: Integer,
    height: Integer,
    enlarge: true || false,
    extend: extend, # See the 'extend' option
  }
}

size

{
  size: {
    width: Integer,
    height: Integer,
    enlarge: true || false,
    extend: extend, # See the 'extend' option
  }
}

resizing_type

{
  resizing_type: String || Symbol,
}

resizing_algorithm (pro)

{
  resizing_algorithm: String || Symbol,
}

width

{
  width: Integer,
}

height

{
  height: Integer,
}

min-width

{
  "min-width": Integer,
}

min-height

{
  "min-height": Integer,
}

zoom

{
  zoom: {
    zoom_x_y: Float
  }
}
{
  zoom: {
    zoom_x: Float
    zoom_y: Float
  }
}

dpr

{
  dpr: Float,
}

enlarge

{
  enlarge: true || false,
}

extend

{
  extend: {
    extend: true || false,
    gravity: gravity, # See the 'gravity' option
  }
}

extend_aspect_ratio

{
  extend_aspect_ratio: {
    extend: true || false,
    gravity: gravity, # See the 'gravity' option
  }
}

gravity

{
  gravity: {
    type: String || Symbol,
    x_offset: Float,
    y_offset: Float,
  }
}

Special gravities

{
  gravity: {
    type: :fp,
    x_offset: Float,
    y_offset: Float,
  }
}
{
  gravity: {
    type: :sm,
  }
}
{
  gravity: {
    type: :obj,
    class_names: Array[String || Symbol],
  }
}

crop

{
  crop: {
    width: Float,
    height: Float,
    gravity: gravity, # See the 'gravity' option
  }
}

trim

{
  trim: {
    threshold: Float,
    color: String,
    equal_hor: true || false,
    equal_ver: true || false,
  }
}

padding

{
  padding: {
    top: Integer,
    right: Integer,
    bottom: Integer,
    left: Integer,
  }
}

auto_rotate

{
  auto_rotate: true || false
}

rotate

{
  rotate: 90 || 180 || 270
}

background

{
  background: {
    r: Integer,
    g: Integer,
    b: Integer,
  }
}
{
  background: {
    hex_color: String,
  }
}

background_alpha (pro)

{
  background_alpha: Float
}

adjust (pro)

{
  adjust: {
    brightness: Integer,
    contrast: Float,
    saturation: Float,
  }
}

brightness (pro)

{
  brightness: Integer,
}

contrast (pro)

{
  contrast: Float,
}

saturation (pro)

{
  saturation: Float,
}

blur

{
  blur: Float,
}

sharpen

{
  sharpen: Float,
}

pixelate (pro)

{
  pixelate: Integer,
}

unsharp_masking (pro)

{
  unsharp_masking: {
    mode: String || Symbol,
    weight: Float,
    divider: Float,
  }
}

blur_detections (pro)

{
  blur_detections: {
    sigma: Float,
    class_names: Array[String || Symbol],
  }
}

draw_detections (pro)

{
  draw_detections: {
    draw: true || false,
    class_names: Array[String || Symbol],
  }
}

gradient (pro)

{
  gradient: {
    opacity: Float,
    color: String,
    direction: String || Symbol,
    start: Float,
    stop: Float,
  }
}

watermark

{
  watermark: {
    opacity: Float,
    position: String || Symbol,
    x_offset: Float,
    y_offset: Float,
    scale: Float,
  }
}

watermark_url (pro)

{
  watermark_url: String # Encoded to Base64 automatically
}

watermark_text (pro)

{
  watermark_text: String # Encoded to Base64 automatically
}

watermark_size (pro)

{
  watermark_size: {
    width: Integer,
    height: Integer,
  }
}

watermark_shadow (pro)

{
  watermark_shadow: Float
}

style (pro)

{
  style: String # Encoded to Base64 automatically
}

strip_metadata

{
  strip_metadata: true || false,
}
{
  keep_copyright: true || false,
}

dpi

{
  dpi: Float,
}

strip_color_profile

{
  strip_color_profile: true || false,
}

enforce_thumbnail

{
  enforce_thumbnail: true || false,
}

quality

{
  quality: Integer,
}

format_quality

{
  format_quality: {
    jpeg: Integer,
    webp: Integer,
    avif: Integer,
    # etc...
  }
}

autoquality

{
  autoquality: {
    method: String || Symbol,
    target: Float,
    min_quality: Integer,
    max_quality: Integer,
    allowed_error: Float,
  }
}

max_bytes

{
  max_bytes: Integer,
}

jpeg_options (pro)

{
  jpeg_options: {
    progressive: true || false,
    no_subsample: true || false,
    trellis_quant: true || false,
    overshoot_deringing: true || false,
    optimize_scans: true || false,
    quant_table: Integer,
  }
}

png_options (pro)

{
  png_options: {
    interlaced: true || false,
    quantize: true || false,
    quantization_colors: Integer,
  }
}

webp_options (pro)

{
  webp_options: {
    compression: String || Symbol,
  }
}

format

{
  format: String || Symbol
}

page (pro)

{
  page: Integer
}

pages (pro)

{
  pages: Integer
}

disable_animation (pro)

{
  disable_animation: true || false
}

video_thumbnail_second (pro)

{
  video_thumbnail_second: Float
}

video_thumbnail_keyframes (pro)

{
  video_thumbnail_keyframes: true || false
}

video_thumbnail_tile (pro)

{
  video_thumbnail_tile: {
    step: Float,
    columns: Integer,
    rows: Integer,
    tile_width: Integer,
    tile_height: Integer,
    extend_tile: true || false,
    trim: true || false,
  }
}

fallback_image_url (pro)

{
  fallback_image_url: String # Encoded to Base64 automatically
}

skip_processing

{
  skip_processing: Array[String || Symbol]
}

raw

{
  raw: true || false
}

cachebuster

{
  cachebuster: String || Symbol
}

expires

{
  expires: Integer || Time,
}

filename

{
  filename: String,
}
{
  filename: {
    filename: String, # Encoded to Base64 automatically if :encoded is true
    encoded: true || false,
  }
}

return_attachment

{
  return_attachment: true || false
}

preset

{
  preset: Array[String || Symbol]
}

hashsum

{
  hashsum: {
    hashsum_type: Array[String || Symbol]
    hashsum: String,
  }
}

max_src_resolution

{
  max_src_resolution: Float
}

max_src_file_size

{
  max_src_file_size: Integer
}

max_animation_frames

{
  max_animation_frames: Integer
}

max_animation_frame_resolution

{
  max_animation_frame_resolution: Float
}