Summary
Add a versioned JSON API endpoint that lists which image formats the current build can decode, along with the decoder implementation backing each format.
Motivation
Consumers (servers, UIs, documentation generators) need to know which formats are decodable at runtime. This depends on which features are enabled (c-codecs, zen-codecs) and which codec preset is active. Currently there's no API to discover this — callers must try decoding and handle errors.
Proposed endpoint
v1/schema/formats/v1/decodable
Returns a list of decodable image formats with:
- Format name (e.g., "jpeg", "png", "webp", "gif", "jxl", "avif", "heic", "tiff", "bmp")
- Decoder name(s) available for that format (e.g., "mozjpeg", "zenjpeg", "libpng", "zenpng")
- Which backend each decoder belongs to (v2 or zen)
- Whether the decoder is the active/preferred one for that format
This should reflect the runtime EnabledCodecs state, not just compile-time feature flags.
Summary
Add a versioned JSON API endpoint that lists which image formats the current build can decode, along with the decoder implementation backing each format.
Motivation
Consumers (servers, UIs, documentation generators) need to know which formats are decodable at runtime. This depends on which features are enabled (
c-codecs,zen-codecs) and which codec preset is active. Currently there's no API to discover this — callers must try decoding and handle errors.Proposed endpoint
v1/schema/formats/v1/decodableReturns a list of decodable image formats with:
This should reflect the runtime
EnabledCodecsstate, not just compile-time feature flags.