Format Selection
Choose the optimal format for your images to reduce file size and improve loading times.
image
Format Parameter
Use the f parameter to specify the output format.
| Format | Best For | Browser Support |
|---|---|---|
auto | All use cases (recommended) | All browsers |
avif | Best compression, photos | Chrome 85+, Firefox 93+ |
webp | Good compression, wide support | All modern browsers |
jpeg | Photos, legacy support | Universal |
png | Transparency, graphics | Universal |
gif | Animated images | Universal |
# Convert to WebP
?f=webp
# Convert to AVIF
?f=avif
# Auto-select best format
?f=autoauto_fix_high
Auto Format
Using f=auto lets imgfast automatically choose the best format based on browser support.
check_circle
Recommended
Always use f=auto for the best balance of file size and compatibility.
Format Selection Priority
- 1AVIF - If browser supports (up to 50% smaller)
- 2WebP - If AVIF not supported (30% smaller)
- 3Original - Fallback for older browsers
tune
Quality Settings
Use the q parameter to control compression quality (1-100).
| Quality | Use Case | File Size |
|---|---|---|
q=90-100 | Print, archival | Largest |
q=80-89 | High quality web (default: 80) | Medium |
q=60-79 | Standard web, thumbnails | Smaller |
q=40-59 | Previews, placeholders | Smallest |
# High quality
?f=webp&q=90
# Standard quality (good for most cases)
?f=auto&q=80
# Lower quality for thumbnails
?f=webp&q=60compare
Format Comparison
Example file sizes for a 1920x1080 photograph at quality 80:
JPEG
250 KB
WebP
175 KB
AVIF
125 KB
* Actual savings vary based on image content. Photos typically see higher savings than graphics.