Open alexscott64 opened 1 year ago
I'm sure this is a duplicate of
I'm sure this is a duplicate of
They are running php8.1 which apparently wasn't compiled with AVIF support originally. See their output:
[AVIF Support] =>
In my case, AVIF support is enabled in GD info, yet, the function output seems to suggest otherwise. I was also told to open a new issue in that other thread.
Will be glad to see it work. Haven't seen it work in any version yet, and was hoping it would work with Debian 12 Bookworm as well, don't think it's working there yet.
Frequently asked questions
Describe the bug PHP 8.2 on Ubuntu 22.04 claims to have AVIF support, but running the function:
imagecreatefromavif()
results in the error:imagecreatefromavif() AVIF image support has been disabled
To Reproduce Steps to reproduce the behavior:
gd
extension usingsudo add-apt-repository ppa:ondrej/php
echo phpinfo();
to confirm thatAVIF Support
is set toenabled
$gd_image = imagecreatefromavif($image_path);
Warning: imagecreatefromavif(): AVIF image support has been disabled
What steps did you take to resolve issue yourself before reporting it here I saw this issue with php8.1 and saw that php8.2 should have fixed it, so I upgraded to php 8.2 on Ubuntu 22.04 and made sure that everything was up to date. Similarly, I saw this issue with avif codecs on ubuntu and confirmed that I am on the correct version of libavif (0.9.2 had the bug):
Expected behavior
imagecreatefromavif()
should work when AVIF image support is enabled.Distribution (please complete the following information):
Package(s) (please complete the following information):
Additional context Additionally, here is the GD package information coming from phpinfo: