Skip to content

Format and codec support matrix

Copy page

Before choosing an output format, register one fact: reads depend on the loaders compiled into libvips; writes depend on native exporters. Format support is not a property of a binding but of the underlying libvips.

Export capability of the reference binding (libvips 8.17.3 / govips v2.19.0)

Section titled “Export capability of the reference binding (libvips 8.17.3 / govips v2.19.0)”

govips ImageRef offers these Export* methods, representing libvips 8.17.3 native write support (from the v2.19.0 source):

Export Method
JPEG ExportJpeg
PNG ExportPng
WebP ExportWebp
AVIF ExportAvif
HEIF ExportHeif
GIF ExportGIF
TIFF ExportTiff
JPEG 2000 ExportJp2k
JPEG XL ExportJxl
Other (magick) ExportMagick

Reading is dispatched by format automatically via LoadImageFromFile / LoadImageFromBuffer to the loaders compiled into libvips. Therefore:

  • Read support = the set of loaders included when your libvips was compiled.
  • If a format has no native loader, govips may fall back to Go’s standard-library image decoder — requiring the corresponding side-effect import (see troubleshooting missing-codec).
  • Detecting animated/special formats may need a newer libvips (see the isAVIF defect in missing-codec).
Format Read (reference) Write (reference) Notes
JPEG Supported ExportJpeg Lossy; EXIF/ICC
PNG Supported ExportPng Lossless; alpha
WebP Supported ExportWebp Lossy/lossless; animation
AVIF Supported ExportAvif Lossy; version-dependent animation detection
HEIF/HEIC Supported ExportHeif High bit depth
GIF Supported ExportGIF Palette; quality boundary in gif-quality
TIFF Supported ExportTiff Multi-page
JPEG XL Supported ExportJxl Depends on libvips build
JPEG 2000 Supported ExportJp2k Depends on libvips build
PDF Read (pdfload) via magick/native No dedicated Export* method
BMP Read-first via magick May use the Go fallback decoder

This table is based on the reference implementation (libvips 8.17.3); sharp’s bundled 8.18.7 may differ, while pyvips/CLI share the system 8.17.3. Other bindings’ rows are comparison-pending and not run-verified by the shared runner.

  • Animation / multi-page: loading all pages is covered in animation-multi-page; GIF quality parameters in gif-quality.
  • Colour / ICC: CMYK and ICC in colour-shift; WebP dropping ICC is a known boundary.
  • Missing native format: see missing-codec for Go side-effect imports and libvips build configuration.
  • Whether a format is available depends heavily on your libvips build, not on this handbook’s version snapshot.
  • Do not assume sharp or pyvips behave identically in their default configuration just because the reference supports an export.
  • govips v2.19.0 source (image_export.go Export* methods).
  • Handbook troubleshooting pages missing-codec / animation-multi-page / gif-quality / colour-shift.

This page is a version snapshot, reviewed 2026-10-11; format capability changes with the libvips build.