• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

[3.14.0.b1] Cannot upload animated * .webp images

DeCysos

Phoenix Foto Service
▶🚶‍Reproduction steps
  1. press Upload
  2. search local file xyz.webp (animated)
  3. try uploading it
😢Unexpected result

Cannot upload image

📃Error log message

[CODE title="error_log"][Sun Dec 22 20:03:19.313376 2019] [proxy_fcgi:error] [pid 19991:tid 140656474605312] [client 92.206.xxx.xxx:53256] AH01071: Got error 'PHP message: PHP Fatal error: gd-webp cannot allocate temporary buffer in /home/users/cysos/www/beta/app/lib/classes/class.imageresize.php on line 210'[/CODE]

screenshot-beta.pfs.red-2019.12.22-20-03-31.png

Yes, I know that Rodolfo knows the mistake. But it is certainly helpful if this is in here again.
 
If it is not possible to upload or process animated webp images with the current software, there is only the option to prohibit them 😉
But this will certainly not inspire everyone.

php:
[CODE lang="php" title="Recognize animation (webp)"]function isWebpAnimated($src){
$webpContents = file_get_contents($src);
$where = strpos($webpContents, "ANMF");
if ($where !== FALSE){
// animated
$isAnimated = true;
}
else{
// non animated
$isAnimated = false;
}
return $isAnimated;
}[/CODE]

Javascript:
[CODE lang="javascript" title="Recognize animation (webp)"]function isWebpAnimated(src) {
var request = new XMLHttpRequest();
request.open('GET', src, true);
request.addEventListener('load', function () {
if(request.response.indexOf("ANMF") != -1){
// animated
alert(true);
}
else{
// non animated
alert(false);
}
});
request.send();
}[/CODE]

But In case of large images PHP and Javascript not working well, So best Solution is to use Shell Script, If you have Ubuntu.
Shell Script:
echo $(grep -c "ANMF" ~/animated.webp)
return 0 if non animated, else non zero value for animated.


But maybe that will help you.


I found the following interesting article.
 
Last edited:
Thanks for the info, but the problem is not the detection of the animated frames.

The problem is that the gd library is not handling the creation of an animated webp image as an image resource.
 
I also ended up with references to these extensions but what is really odd is that there's still no support for GD / ImageMagick out of the box, even if you compile it with support for it.
 
Yes, I also noticed that the extension for webp must also be available at GDLib.
Unfortunately, this is not the case for many hosters, which in turn will lead to many Chevereto customers reporting the errors.

The stupid thing is that you have to recompile php if you want to have webp support. For Plesk users, unfortunately, this is made more difficult by the fact that Plesk webp does not yet support it.
Every time php is updated by Plesk, the manually compiled php is replaced again. (At least that's how I read it).

At first there will be nothing left but to do without animated webp images.

I also read somewhere that it should work with ffmpeg. But I'm not sure whether the webm format was meant after all.

I haven't made up my mind about ImageMagick yet.
But with certainty.

Unfortunately there are not too many pioneers at the moment via webp 😉
At least not for animated images which should also run on customers' servers.
 
Back
Top