Region & Output Parameters#

Extract specific regions from images and control the output format and quality for optimal results.

Extract (Region Extraction)#

Description#

Extract a specific region from the image before other transformations are applied.

Format#

extract:x-y-width-height

Value Types#

  • 0-100: Percentage of original image dimensions
  • >100: Pixel values

Usage#

Extract center 50% region:

?transform=extract:25-25-50-50

Extract top-left 25% region:

?transform=extract:0-0-25-25

Pixel-based#

Extract 400x300 region starting at (100, 100):

?transform=extract:100-100-400-300

Examples#

Center 50% extraction:

Original image
Original
Center 50% extracted
Extracted

Important Notes#

  • x and y must be ≥ 0
  • width and height must be positive
  • Maximum output size: 16384 x 16384 pixels
  • Extraction happens before resize

Format (Output Format)#

Description#

Specify the output format for the transformed image.

Supported Formats#

FormatCompressionTransparencyAnimationUse Cases
jpeg / jpgLossyPhotos, landscapes
pngLosslessLogos, graphics
webpBothWeb optimization
avifBothBest compression
gifLosslessSimple animations
tiff / tifBothProfessional work
autoAdaptiveBrowser-based (recommended)
animated-webpLossyGIF alternative

The auto format automatically selects the optimal format based on the browser's Accept header:

?transform=format:auto

Selection logic:

  • AVIF-supporting browsers → AVIF
  • WebP-supporting browsers → WebP
  • Legacy browsers → JPEG/PNG

Usage Examples#

Photos: ?transform=format:jpeg,quality:85

Logos (transparent): ?transform=format:png

Web optimization: ?transform=format:webp,quality:85

Best compression: ?transform=format:avif,quality:90


Quality#

Description#

Set the quality level for lossy compression formats (JPEG, WebP, AVIF).

Range#

  • 1 to 100
  • Higher values = better quality, larger file size

Default Values#

FormatDefault Quality
JPEG85
WebP85
AVIF80

Usage#

?transform=quality:90

Quality Guidelines#

Quality RangeUse CaseFile SizeVisual Quality
60-70Thumbnails, previewsSmallAcceptable
75-85Web standard (recommended)MediumExcellent
90-95High-quality imagesLargeNear-perfect
95-100Professional workVery largeOriginal quality

Note#

For most web use cases, quality:85 provides an excellent balance between file size and visual quality. Values above 95 result in significantly larger files with minimal visual improvement.


Combining Parameters#

Extract + Resize + Format#

?transform=extract:25-25-50-50,w:400,format:webp,quality:85

Multiple Transformations#

?transform=extract:10-10-80-80,w:800,h:600,fit:cover,format:avif,quality:90

Common Use Cases#

Focus on Subject#

Extract center region and optimize:

?transform=extract:20-20-60-60,w:600,format:webp

Crop and Download#

Extract specific area for download:

?transform=extract:100-100-400-300,format:png,dl:cropped-image

High-Quality Export#

Maximum quality for professional use:

?transform=w:2000,format:png,quality:100

Next Steps#