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
We are using image transforms to convert JPEGs to AVIFs. This works fine locally in ddev, but fails on our (managed VPS) live server.
In the browser, we get the folliwing error:
Internal Server Error
Failed to generate transform with id of 251.
In the log file, we get:
2024-09-06 08:21:49 [web.ERROR] [craft\errors\ImageTransformException] Failed to generate transform with id of 622. {"trace":["#0 /home/***********************/vendor/craftcms/cms/src/controllers/AssetsController.php(1131): craft\\imagetransforms\\ImageTransformer->getTransformUrl()","#1 [internal function]: craft\\controllers\\AssetsController->actionGenerateTransform()","#2 /home/***********************/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#3 /home/***********************/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","#4 /home/***********************/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()","#5 /home/***********************/vendor/craftcms/cms/src/web/Application.php(349): yii\\base\\Module->runAction()","#6 /home/***********************/vendor/craftcms/cms/src/web/Application.php(648): craft\\web\\Application->runAction()","#7 /home/***********************/vendor/craftcms/cms/src/web/Application.php(311): craft\\web\\Application->_processActionRequest()","#8 /home/***********************/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()","#9 /home/***********************/web/index.php(12): yii\\base\\Application->run()","#10 {main}"],"memory":21822144,"exception":"[object] (craft\\errors\\ImageTransformException(code: 0): Failed to generate transform with id of 622. at /home/***********************/vendor/craftcms/cms/src/imagetransforms/ImageTransformer.php:153)\n[previous exception] [object] (craft\\errors\\ImageException(code: 2): Failed to save the image. at /home/***********************/vendor/craftcms/cms/src/image/Raster.php:584)\n[previous exception] [object] (Imagine\\Exception\\RuntimeException(code: 2): imageavif(): AVIF image support has been disabled\n at /home/***********************/vendor/pixelandtonic/imagine/src/Utils/ErrorHandling.php:73)\n[previous exception] [object] (ErrorException(code: 0): imageavif(): AVIF image support has been disabled\n at /home/***********************/vendor/pixelandtonic/imagine/src/Gd/Image.php:648)"}
phpinfo confirms that AVIF support is enabled and we have installed libheif-dev along with libjpeg-dev, libpng-dev and libwebp-dev on the server.
We put the following test code in a PHP file in the web root and it works perfectly (the AVIF image is created).
Sorry, I missed that the previous exception was included in that.
Here’s the underlying error, pulled from that:
imageavif(): AVIF image support has been disabled
That’s coming straight from PHP. I’m not sure why there’s a discrepancy between that and what phpinfo() is telling you, though. Are you calling phpinfo() in your own script, or checking Utilities → PHP Info in the control panel?
What happened?
Description
We are using image transforms to convert JPEGs to AVIFs. This works fine locally in ddev, but fails on our (managed VPS) live server.
In the browser, we get the folliwing error:
In the log file, we get:
phpinfo confirms that AVIF support is enabled and we have installed libheif-dev along with libjpeg-dev, libpng-dev and libwebp-dev on the server.
We put the following test code in a PHP file in the web root and it works perfectly (the AVIF image is created).
The fact that AVIF generation works on the server outside of Craft suggests that this is a Craft-specific issue?
PHP 8.2.5
Image driver: GD 8.2.5
Craft CMS version
5.3.6
PHP version
8.2.5
Operating system and version
Ubuntu 18.04.6 LTS
Database type and version
MariaDB
Image driver and version
GD 8.2.5
Installed plugins and versions
Amazon S3 2.2.1
Blitz 5.7.1
Bugsnag 5.0.0
CKEditor 4.2.0
Dashboard Begone 3.0.0
Element API 4.1.0
Navigation 3.0.3
oEmbed 3.0.9
SEOmatic 5.1.2
Sprig 3.5.0
Wordsmith 5.0.0
The text was updated successfully, but these errors were encountered: