Skip to main content

Core Parameters

resize
string
Resize the image to specified dimensions using the format WxH.Examples:
  • resize:800x600 - Resize to 800×600 pixels
  • resize:1920x1080 - Resize to Full HD dimensions
  • resize:400x400 - Resize to square format
crop
string
default:"fill"
Define how the image is cropped during resizing.Available modes:
  • fill - Fill entire area, cropping if necessary (default)
  • fit - Fit within dimensions while preserving aspect ratio
  • scale - Stretch to exact dimensions, ignoring aspect ratio
  • crop - Resize and crop to exact dimensions
  • pad - Fit and add borders with background color
aspect
string
Apply a specific aspect ratio by cropping the image. Format: W:H.Common ratios:
  • aspect:16:9 - Widescreen video format
  • aspect:1:1 - Square format (Instagram)
  • aspect:4:3 - Classic photo format
  • aspect:21:9 - Ultrawide banner format
rotate
string | number
Rotate the image by specified degrees or automatically using data.Values:
  • auto - Automatic rotation based on EXIF orientation
  • 0-360 - Rotation angle in degrees
gravity
string
default:"center"
Define the focal point for cropping operations.Available positions:
  • center - Center of the image (default)
  • north - Top edge
  • south - Bottom edge
  • east - Right edge
  • west - Left edge
  • face - AI-powered face detection
  • auto - Automatic detection of region of interest using entropy analysis
background
string
Set background color for rotation or pad crop mode.Formats:
  • Hexadecimal without #: FF0000 (red), FFFFFF (white)
  • transparent - Transparent background (PNG/WebP output)
quality
integer
default:"85"
Control compression quality level. Range: 1-100.Recommendations:
  • 90-100 - High quality, larger file size
  • 80-89 - Optimal balance (recommended)
  • 60-79 - Higher compression, smaller files
  • 1-59 - Maximum compression, visible artifacts
format
string
Force a specific output format.Available formats:
  • avif - Modern format, best compression (up to 50% smaller)
  • webp - Modern format, excellent compatibility
  • jpeg / jpg - Universal standard format
  • png - Lossless, supports transparency

Basic Examples

  • Basic Resize
  • Smart Cropping
  • Aspect Ratio
  • Format Conversion
GET /t/resize:800x600/image.jpg
Resize an image to 800×600 pixels using default fill mode.

Advanced Examples

GET /t/aspect:1:1/resize:1080x1080/gravity:face/quality:85/format:webp/portrait.jpg
Perfect square format with face-focused cropping and WebP output for social media.
GET /t/resize:400x300/crop:pad/background:F5F5F5/quality:80/thumbnail.jpg
Create a padded thumbnail with light gray background for consistent dimensions.
GET /t/rotate:15/background:transparent/resize:200x200/logo.png
Rotate a logo while maintaining transparent background for web overlays.
GET /t/resize:1920x1080/quality:85/format:avif/landscape.jpg
Full HD output with AVIF format for maximum compression and quality balance.

Supported Image Formats

  • Input Formats
  • Output Formats
The system accepts the following image formats as input:
  • JPEG / JPG - Standard photo format
  • PNG - With full transparency support
  • WebP - Modern web format
  • AVIF - Next-generation format
  • GIF - First frame only (static output)

Best Practices

Optimize for web

Use quality:85 with automatic format selection for the best balance of quality and file size.

Leverage face detection

Apply gravity:face for portraits and profile images to ensure faces remain in frame after cropping.

Batch similar sizes

Standardize image dimensions across your application to maximize cache efficiency.

Use modern formats

Specify format:avif or format:webp for significant file size reductions on modern browsers.