Quality

Control image compression quality for optimal file size.

The q parameter controls the compression quality of the output image. Lower values produce smaller files with more compression artifacts.

Usage

# High quality
?q=90

# Medium quality (good balance)
?q=75

# Low quality (smaller files)
?q=50

# Combined with other transforms
?w=800&f=webp&q=80

Valid Range

  • Minimum: 1
  • Maximum: 100
  • Must be a whole number
  • Values below 10 are clamped to 10 during processing

Dynamic Quality

When q is not specified, Tuzzle automatically selects a quality level based on the output image's largest dimension:

Largest DimensionAuto Quality
Up to 1000px90
1000 to 2500px85
2500 to 5000px80
5000 to 7500px75
7500 to 10000px70
Over 10000px60

This provides a good balance between visual quality and file size across different image sizes. Smaller images get higher quality because compression artifacts are more visible, while larger images use lower quality because the detail at full size masks artifacts.

Quality by Format

The q parameter affects different formats differently:

FormatBehavior
JPEGControls JPEG quality (MozJPEG encoder, progressive)
WebPControls lossy WebP quality
AVIFControls AVIF quality with 4:2:0 chroma subsampling
PNGQuality has minimal effect (PNG is lossless, compression level is fixed at 9)
TIFFQuality has minimal effect (uses LZW compression)

Recommendations

Use CaseSuggested Quality
Thumbnailsq=80 or auto
Product imagesq=85
Hero imagesq=90
Photographyq=90-95
Backgroundsq=70
Icons/logosUse PNG instead