• The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question When will PHP 8.1 be available?

I have compiled gd.so module with AVIF support for the current version of Plesk PHP 8.1.2 version (OS Ubuntu 20.04):

# cat gdinfo.php
<?php
var_dump(gd_info());
?>

# /opt/plesk/php/8.1/bin/php gdinfo.php
array(15) {
["GD Version"]=>
string(26) "bundled (2.1.0 compatible)"
["FreeType Support"]=>
bool(true)
["FreeType Linkage"]=>
string(13) "with freetype"
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(true)
["XBM Support"]=>
bool(true)
["WebP Support"]=>
bool(true)
["BMP Support"]=>
bool(true)
["AVIF Support"]=>
bool(true)

["TGA Read Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}

You can try to backup the original module file with

# mv /opt/plesk/php/8.1/lib/php/modules/gd.so /opt/plesk/php/8.1/lib/php/modules/gd.so_orig

And then place attached to /opt/plesk/php/8.1/lib/php/modules/

But note, that it was compiled by me for testing purposes and I do not guarantee that it will work without any problems.
It was my personal initiative and interest.
I tried to replace original file with your gd.so attached, but i have this error:
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /opt/plesk/php/8.1/lib/php/modules/gd.so (libavif.so.13: cannot open shared object file: No such file or directory), /opt/plesk/php/8.1/lib/php/modules/gd.so.so (/opt/plesk/php/8.1/lib/php/modules/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Interactive shell

php > var_export(gd_info());
PHP Warning:  Uncaught Error: Call to undefined function gd_info() in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1

I have OS Ubuntu 20.04 and PHP 8.1.2 with Plesk Obsidian 18.0.55.
Maybe is not compatible with my plesk version?
 
I have updated to the last Plesk version, I have installed PHP 8.4 and when I try to convert an image to AVIF I get this error:

Warning: imageavif(): avif error - Could not encode image: No codec available

Is there anything else I should install or configure?

I made a script to check support and everything seems to be in order:

PHP:
<?php
if (function_exists('imageavif')) {
    echo "imageavif() is available.\n";
} else {
    echo "imageavif() is NOT available.\n";
}


$info = gd_info();
if (isset($info['AVIF Support']) && $info['AVIF Support']) {
    echo "GD extension has AVIF support enabled.\n";
} else {
    echo "GD extension does NOT support AVIF.\n";
}


The result is as expected:

imageavif() is available.
GD extension has AVIF support enabled.
 
Sure!

Server is Debian 11.11, Plesk Obsidian 18.0.67, PHP 8.4.3

PHP:
$original_filename = '/path/to/file.jpg';
$destination_filename = '/path/to/new_file.avif';
// Read file
$image = imagecreatefromavif($original_filename);
imagepalettetotruecolor($image);
imagealphablending($image, true);
imagesavealpha($image, true);
// Save file as AVIF
imageavif($image, $destination_filename);

It creates a 0 byte file and throws that warning. I have all the updates installed. Any clue?
 
Back
Top