-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
The WordPress Docker images cannot encode AVIF images using ImageMagick/Imagick, despite having AVIF decoding support. This occurs because the libheif-plugin-aomenc package (the AVIF encoder) is removed when recommended packages are stripped from the image.
When attempting to convert images to AVIF format using Imagick, the following error occurs:
no encode delegate for this image format `AVIF' @ error/constitute.c/WriteImage/1412The queryFormats check passes for "AVIF" because the decoder is present, but encoding fails.
The issue seems to stem from the Dockerfile template's package installation process:
-
libmagickwand-devis installed at:
Line 66 in 4eb711d
libmagickwand-dev \ -
Recommended packages are removed at:
Line 124 in 4eb711d
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
Dependency chain:
-
libmagickwand-devdepends onlibmagickcore-7.q16-dev
(ref: https://packages.debian.org/trixie/libmagickwand-7.q16-dev) -
libmagickcore-7.q16-devdepends onlibmagickcore-7.q16-10
(ref: https://packages.debian.org/trixie/libmagickcore-7.q16-dev) -
libmagickcore-7.q16-10depends onlibheif1
(ref: https://packages.debian.org/trixie/libmagickcore-7.q16-10) -
libheif1depends onlibheif-plugin-dav1dorlibheif-plugin-aomdec
(ref: https://packages.debian.org/trixie/libheif1)
Here, libheif-plugin-dav1d is the decoder and is a hard dependency and libheif-plugin-aomdec is a encoder but it is a recommended dependency (ref: https://packages.debian.org/trixie/libheif1). It is not included in the WordPress Docker image because recommended packages are removed, causing the loss of encoder.