Skip to content

Latest commit

 

History

History
724 lines (577 loc) · 10.9 KB

processing_options.md

File metadata and controls

724 lines (577 loc) · 10.9 KB

Supported processing options

{
  resize: {
    resizing_type: String || Symbol,
    width: Integer,
    height: Integer,
    enlarge: true || false,
    extend: extend, # See the 'extend' option
  }
}
{
  size: {
    width: Integer,
    height: Integer,
    enlarge: true || false,
    extend: extend, # See the 'extend' option
  }
}
{
  resizing_type: String || Symbol,
}
{
  resizing_algorithm: String || Symbol,
}
{
  width: Integer,
}
{
  height: Integer,
}
{
  "min-width": Integer,
}
{
  "min-height": Integer,
}
{
  zoom: {
    zoom_x_y: Float
  }
}
{
  zoom: {
    zoom_x: Float
    zoom_y: Float
  }
}
{
  dpr: Float,
}
{
  enlarge: true || false,
}
{
  extend: {
    extend: true || false,
    gravity: gravity, # See the 'gravity' option
  }
}
{
  extend_aspect_ratio: {
    extend: true || false,
    gravity: gravity, # See the 'gravity' option
  }
}
{
  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: {
    width: Float,
    height: Float,
    gravity: gravity, # See the 'gravity' option
  }
}
{
  trim: {
    threshold: Float,
    color: String,
    equal_hor: true || false,
    equal_ver: true || false,
  }
}
{
  padding: {
    top: Integer,
    right: Integer,
    bottom: Integer,
    left: Integer,
  }
}
{
  auto_rotate: true || false
}
{
  rotate: 90 || 180 || 270
}
{
  background: {
    r: Integer,
    g: Integer,
    b: Integer,
  }
}
{
  background: {
    hex_color: String,
  }
}
{
  background_alpha: Float
}
{
  adjust: {
    brightness: Integer,
    contrast: Float,
    saturation: Float,
  }
}
{
  brightness: Integer,
}
{
  contrast: Float,
}
{
  saturation: Float,
}
{
  blur: Float,
}
{
  sharpen: Float,
}
{
  pixelate: Integer,
}
{
  unsharp_masking: {
    mode: String || Symbol,
    weight: Float,
    divider: Float,
  }
}
{
  blur_detections: {
    sigma: Float,
    class_names: Array[String || Symbol],
  }
}
{
  draw_detections: {
    draw: true || false,
    class_names: Array[String || Symbol],
  }
}
{
  gradient: {
    opacity: Float,
    color: String,
    direction: String || Symbol,
    start: Float,
    stop: Float,
  }
}
{
  watermark: {
    opacity: Float,
    position: String || Symbol,
    x_offset: Float,
    y_offset: Float,
    scale: Float,
  }
}
{
  watermark_url: String # Encoded to Base64 automatically
}
{
  watermark_text: String # Encoded to Base64 automatically
}
{
  watermark_size: {
    width: Integer,
    height: Integer,
  }
}
{
  watermark_shadow: Float
}
{
  style: String # Encoded to Base64 automatically
}
{
  strip_metadata: true || false,
}
{
  keep_copyright: true || false,
}
{
  dpi: Float,
}
{
  strip_color_profile: true || false,
}
{
  enforce_thumbnail: true || false,
}
{
  quality: Integer,
}
{
  format_quality: {
    jpeg: Integer,
    webp: Integer,
    avif: Integer,
    # etc...
  }
}
{
  autoquality: {
    method: String || Symbol,
    target: Float,
    min_quality: Integer,
    max_quality: Integer,
    allowed_error: Float,
  }
}
{
  max_bytes: Integer,
}
{
  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: {
    interlaced: true || false,
    quantize: true || false,
    quantization_colors: Integer,
  }
}
{
  webp_options: {
    compression: String || Symbol,
  }
}
{
  format: String || Symbol
}
{
  page: Integer
}
{
  pages: Integer
}
{
  disable_animation: true || false
}
{
  video_thumbnail_second: Float
}
{
  video_thumbnail_keyframes: true || false
}
{
  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: String # Encoded to Base64 automatically
}
{
  skip_processing: Array[String || Symbol]
}
{
  raw: true || false
}
{
  cachebuster: String || Symbol
}
{
  expires: Integer || Time,
}
{
  filename: String,
}
{
  filename: {
    filename: String, # Encoded to Base64 automatically if :encoded is true
    encoded: true || false,
  }
}
{
  return_attachment: true || false
}
{
  preset: Array[String || Symbol]
}
{
  hashsum: {
    hashsum_type: Array[String || Symbol]
    hashsum: String,
  }
}
{
  max_src_resolution: Float
}
{
  max_src_file_size: Integer
}
{
  max_animation_frames: Integer
}
{
  max_animation_frame_resolution: Float
}