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#
Percentage-based (Recommended)#
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:


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#
| Format | Compression | Transparency | Animation | Use Cases |
|---|---|---|---|---|
jpeg / jpg | Lossy | ❌ | ❌ | Photos, landscapes |
png | Lossless | ✅ | ❌ | Logos, graphics |
webp | Both | ✅ | ✅ | Web optimization |
avif | Both | ✅ | ❌ | Best compression |
gif | Lossless | ✅ | ✅ | Simple animations |
tiff / tif | Both | ✅ | ❌ | Professional work |
auto | Adaptive | ✅ | ❌ | Browser-based (recommended) |
animated-webp | Lossy | ✅ | ✅ | GIF alternative |
Auto Format (Recommended)#
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#
| Format | Default Quality |
|---|---|
| JPEG | 85 |
| WebP | 85 |
| AVIF | 80 |
Usage#
?transform=quality:90
Quality Guidelines#
| Quality Range | Use Case | File Size | Visual Quality |
|---|---|---|---|
| 60-70 | Thumbnails, previews | Small | Acceptable |
| 75-85 | Web standard (recommended) | Medium | Excellent |
| 90-95 | High-quality images | Large | Near-perfect |
| 95-100 | Professional work | Very large | Original 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#
- Animation - Optimize animated images
- Download Control - Control download behavior
- Best Practices - Learn optimization strategies
