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.

FormatBest ForBrowser Support
autoAll use cases (recommended)All browsers
avifBest compression, photosChrome 85+, Firefox 93+
webpGood compression, wide supportAll modern browsers
jpegPhotos, legacy supportUniversal
pngTransparency, graphicsUniversal
gifAnimated imagesUniversal
# Convert to WebP
?f=webp

# Convert to AVIF
?f=avif

# Auto-select best format
?f=auto
auto_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

  1. 1AVIF - If browser supports (up to 50% smaller)
  2. 2WebP - If AVIF not supported (30% smaller)
  3. 3Original - Fallback for older browsers
tune

Quality Settings

Use the q parameter to control compression quality (1-100).

QualityUse CaseFile Size
q=90-100Print, archivalLargest
q=80-89High quality web (default: 80)Medium
q=60-79Standard web, thumbnailsSmaller
q=40-59Previews, placeholdersSmallest
# High quality
?f=webp&q=90

# Standard quality (good for most cases)
?f=auto&q=80

# Lower quality for thumbnails
?f=webp&q=60
compare

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.