You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked at the list of the existing issues (including closed issues) and searched if my issue has been already reported
I have tried to resolve the issue myself and will describe what I did in clear and consise manner
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:
Install PHP 8.2 and the gd extension using sudo add-apt-repository ppa:ondrej/php
Using apache2, create a file and run echo phpinfo(); to confirm that AVIF Support is set to enabled
Run $gd_image = imagecreatefromavif($image_path);
This should result in the following warning: 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):
=|/ Name Version Architecture Description
+++-=================-============-============-====================================================
ii libavif-dev:amd64 0.9.3-3 amd64 Library for handling .avif files (development files)
ii libavif13:amd64 0.9.3-3 amd64 Library for handling .avif files
Expected behavior imagecreatefromavif() should work when AVIF image support is enabled.
Distribution (please complete the following information):
OS: Ubuntu 22.04.3 LTS (Jammy)
Architecture: amd64
Repository: ppa:ondrej/php
Package(s) (please complete the following information):
500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main i386 Packages
release v=22.04,o=LP-PPA-ondrej-php,a=jammy,n=jammy,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=i386
origin ppa.launchpadcontent.net
500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages
release v=22.04,o=LP-PPA-ondrej-php,a=jammy,n=jammy,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=amd64
origin ppa.launchpadcontent.net
Additional context
Additionally, here is the GD package information coming from phpinfo:
GD Support
enabled
GD headers Version
2.3.3
GD library Version
2.3.3
FreeType Support
enabled
FreeType Linkage
with freetype
GIF Read Support
enabled
GIF Create Support
enabled
JPEG Support
enabled
PNG Support
enabled
WBMP Support
enabled
XPM Support
enabled
XBM Support
enabled
WebP Support
enabled
BMP Support
enabled
AVIF Support
enabled
TGA Read Support
enabled
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: