MagestyApps / module-web-images

Magento 2 module for uploading images in optimised formats (SVG, WebP, etc.)
https://www.magestyapps.com
93 stars 16 forks source link

Warning: call_user_func() expects parameter 1 to be a valid callback #14

Closed JonAware closed 1 year ago

JonAware commented 2 years ago

Hi, I'm getting the following error when trying to upload a webp image on my live site:

It seems to upload the image after that error, however, the thumbnail is broken.

image.webp was not uploaded.
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'imagecreatefromwebp' not found or invalid function name in /var/www_m2/site.co.uk/releases/3134dd48-4b49-4c52-9235-d3d75892f2d3/vendor/magestyapps/module-web-images/Model/Image/Adapter/Gd2Rewrite.php on line 80`

magestyapps/module-web-images: 1.1.6 magento/product-community-edition: 2.4.3-p2

MagestyApps commented 1 year ago

Hi @JonAware

The error message that you provided is not related to the module. It is related to your PHP configuration. Most likely, PHP GD library is not installed or not enabled in php.ini. Because the imagecreatefromwebp is a native PHP function that is added within GD library.