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

Hello, I am having a server issue.

Just deployed to staging server and have got this error:
imageavif(): avif error - Could not encode image: No codec available

Have checked phpinfo and server ha GD with AVIF enabled, so not sure exactly what the issue is. Has anybody else came across this error?

Thanks!

All modules appear to be installed on server:

image (3)

Sounds as if there is something else missing. What’s your PHP version?

My PHP version is 8.1.29

https://phpstack-1350759-4964766.cloudwaysapps.com/phpinfo.php

Which version of libavif is running on that server? Maybe you can update to another PHP version?

I tried changing to php 8.2, but the error still persisted unfortunately.

It has the libavif version 0.8.4-2+deb11u1 installed.

I read somewhere that libavif v 0.8.6+ is needed when I googled that error, maybe try googling the error from above yourself