Closed dhmax88 closed 5 months ago
Hi,
In regards to AVIF, this appears to be a bug in certain compiled ImageMagick versions, see:
https://askubuntu.com/questions/1411869/creating-avif-or-heic-images-with-transparency-does-not-work-with-imagemagick-in https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1980124 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040307
I've confirmed that this happens both when using Imager X, Craft's native transforms, and Imagick directly, on the latest version of ddev.
In regards to WebP, I don't see any such issues. Have you tested if it's really the case that WebP also has a black background, or might it be that you got served the AVIF file through a picture tag?
Thanks André
You’re correct - we ended up removing the avif transform and sticking to just webp. All is transparent as expected!
On Sat, 8 Jun 2024 at 10:47, André Elvan @.***> wrote:
Hi,
In regards to AVIF, this appears to be a bug in certain compiled ImageMagick versions, see:
https://askubuntu.com/questions/1411869/creating-avif-or-heic-images-with-transparency-does-not-work-with-imagemagick-in https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1980124 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040307
I've confirmed that this happens both when using Imager X, Craft's native transforms, and Imagick directly, on the latest version of ddev.
In regards to WebP, I don't see any such issues. Have you tested if it's really the case that WebP also has a black background, or might it be that you got served the AVIF file through a picture tag?
— Reply to this email directly, view it on GitHub https://github.com/spacecatninja/craft-imager-x/issues/264#issuecomment-2155908408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMEL3F7AKYSUAQBJGXLG3ZGLHJJAVCNFSM6AAAAABI73EGWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVHEYDQNBQHA . You are receiving this because you authored the thread.Message ID: @.***>
Btw, it seems like transparency works perfectly fine when using a command line encoder like cavif, which can be configured to be used as a custom encoder in Imager, see the docs.
Not a perfect solution, but maybe helpful if you or someone else really want to deliver transparent avifs. :)
Hi! Is it possible to maintain transparency on PNG images, they are being converted to avif and webp but have black backgrounds?