Skip to content
Console

Image format conversion

Parameters

ParameterMeaningDetails
fmtOutput formatIf omitted, the source format is usually kept; HEIC, camera RAW, and similar formats are output as JPEG. Alias: fm

For the input formats CoreIX recognizes, see Supported formats.

Output formats

Image formats

fmt valueFormatCharacteristicsTransparencyAnimation
jpg / jpegJPEGBest compatibility; ideal for photos––
pngPNGLossless; larger files✓✓
tpngPNG (quantized)Color-reduced compression; files are noticeably smaller than standard PNG✓–
webpWebPGood balance of quality and file size; widely supported by modern browsers✓✓
avifAVIFHigh compression ratio; supports HDR✓✓
jxlJPEG XLHigh compression ratio; supports HDR and high bit depth✓–
heic / heifHEICCommon in the Apple ecosystem; supports HDR✓–
gifGIFThe most widely compatible animated format; up to 256 colors✓✓
tiffTIFFFor professional use✓–
bmpBMPUncompressed bitmap––

Auto and keep

fmt valueBehavior
autoChosen automatically based on the browser: tries JPEG XL, AVIF, and WebP in that order, and falls back to the source format if none is supported
keepKeeps the source format. For SVG sources, unsafe code is filtered out automatically

fmt=auto determines which formats the browser supports from the request's Accept header, and the response includes Vary: Accept. Animated images are never output as JPEG XL; AVIF or WebP is chosen instead. You can also write auto=format.

If you explicitly specify fmt=avif or fmt=webp and the browser doesn't support it, the output also falls back automatically: AVIF falls back to WebP, and WebP falls back to the default output for the source format.

Information output

The following values return text or JSON instead of an image:

fmt valueReturns
infoImage metadata (JSON)
colorThe image's dominant color
blurhashA BlurHash placeholder string
thumbhashA ThumbHash placeholder string

For palettes, perceptual hashes, faces, labels, and other analysis output, see Image analysis.

Demo

Original image:

Original

Convert to WebP: https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000&w=300 &fmt=webp

WebP output

Convert to PNG (lossless): https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000&w=300 &fmt=png

PNG output

Convert to AVIF (high compression): https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000&w=300 &fmt=avif

AVIF output

Choosing a format

ScenarioRecommendation
Web images where you want the smallest file size automaticallyfmt=auto
Photos that need the broadest compatibilityjpg
Transparency or lossless outputpng; use tpng or webp if file size matters
Maximum compressionavif
HDR contentjpg (compatible with SDR devices) or avif
Animated imageswebp or avif; use gif for the broadest compatibility

Tips

  • Use the q (quality) parameter to further control file size. The default quality is 88.
  • Icons, screenshots, line art, and other images with 256 colors or fewer are automatically encoded with a lossless palette when output as PNG or WebP, producing smaller files with no loss of fidelity.