codecs-php / codecs
In-process AVIF and JPEG-XL image decoding and encoding for PHP, backed by statically linked libavif and libjxl
Package info
github.com/FojleRabbiRabib/codecs-php
Language:C
Type:php-ext
Ext name:ext-codecs
pkg:composer/codecs-php/codecs
dev-main
2026-10-21 10:36 UTC
Requires
- php: >=8.3
Requires (Dev)
- phpstan/phpstan: ^2.1
- squizlabs/php_codesniffer: ^3.13
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-21 10:47:09 UTC
README
In-process AVIF and JPEG-XL image decoding, encoding, and header probing for PHP 8.3+, backed by statically linked builds of libavif and libjxl.
- Self-contained single
.so— vendored codec libraries linked with a symbol version script that exports onlyget_module; no systemlibavif/libjxlpackages or ImageMagick/GD delegates required. - In-process — no
shell_execto CLI binaries, no temporary files, and no FFI runtime requirement. - Multi-ABI — targets PHP 8.3, 8.4, and 8.5 (PIE
type: php-ext).
Requirements
- PHP 8.3, 8.4, or 8.5 (NTS or ZTS)
- Linux
x86_64/aarch64
Building from source
phpize
./configure --enable-codecs
make -j"$(nproc)"
php -n -d extension=modules/codecs.so --ri codecs
Quick verify
<?php declare(strict_types=1); var_dump(Codecs\Codec::version());