• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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

Unable to upload webp picture

doro

核心许可证
▶🚶‍Reproduction steps
  1. Console> Settings> Picture upload> Enabled image format> webp
  2. Save modify> Website> Upload webp format picture
😢Unexpected result

No picture was uploaded
An error occurred and your request could not be processed.

📃Error log message

Can't get target upload source info

Other
  1. JPG PNG BMP GIF upload is normal
  2. Only webp can't upload
 
Can't get target upload source info
[CODE lang="php" title="app/lib/classes/class.upload.php" highlight="3"] // file info?
if (!$this->source_image_fileinfo) {
throw new UploadException("Can't get target upload source info", 310);
}[/CODE]
[CODE lang="php" title="lib/G/functions.php" highlight="10"] // Retrieves info about the current image file
function get_image_fileinfo($file)
{
clearstatcache(true, $file); // http://php.net/manual/es/function.clearstatcache.php (add G\ magic for those)

$info = getimagesize($file);
$filesize = @filesize($file);

if (!$info || $filesize === false) {
return false;
}

$mime = strtolower($info['mime']);

return array(
'filename' => basename($file), // image.jpg
'name' => basename($file, '.' . get_file_extension($file)), // image
'width' => intval($info[0]),
'height' => intval($info[1]),
'ratio' => $info[0] / $info[1],
'size' => intval($filesize),
'size_formatted' => format_bytes($filesize),
'mime' => $mime,
'extension' => mime_to_extension($mime),
'bits' => $info['bits'],
'channels' => $info['channels'],
'url' => absolute_to_url($file),
'md5' => md5_file($file),
);
}[/CODE]
Function getimagesize is returning false for WebP because probably PHP GD wasn't compiled with support for WebP. Support for the alleged format is provided by PHP GD (standar) so simply try to re-compile it with support for it.
 
[CODE lang="php" title="app/lib/classes/class.upload.php" highlight="3"] // file info?
if (!$this->source_image_fileinfo) {
throw new UploadException("Can't get target upload source info", 310);
}[/CODE]
[CODE lang="php" title="lib/G/functions.php" highlight="10"] // Retrieves info about the current image file
function get_image_fileinfo($file)
{
clearstatcache(true, $file); // http://php.net/manual/es/function.clearstatcache.php (add G\ magic for those)

$info = getimagesize($file);
$filesize = @filesize($file);

if (!$info || $filesize === false) {
return false;
}

$mime = strtolower($info['mime']);

return array(
'filename' => basename($file), // image.jpg
'name' => basename($file, '.' . get_file_extension($file)), // image
'width' => intval($info[0]),
'height' => intval($info[1]),
'ratio' => $info[0] / $info[1],
'size' => intval($filesize),
'size_formatted' => format_bytes($filesize),
'mime' => $mime,
'extension' => mime_to_extension($mime),
'bits' => $info['bits'],
'channels' => $info['channels'],
'url' => absolute_to_url($file),
'md5' => md5_file($file),
);
}[/CODE]
Function getimagesize is returning false for WebP because probably PHP GD wasn't compiled with support for WebP. Support for the alleged format is provided by PHP GD (standar) so simply try to re-compile it with support for it.

I see your reply,but I'm not a programmer, so I may not know how to do it, can it be solved by updating?
 
At the bottom of my reply it reads:
Function getimagesize is returning false for WebP because probably PHP GD wasn't compiled with support for WebP. Support for the alleged format is provided by PHP GD (standar) so simply try to re-compile it with support for it.
This can't be fixed at programming layer, is the supporting software (PHP GD) which need to be compiled with support for it.
 
At the bottom of my reply it reads:

This can't be fixed at programming layer, is the supporting software (PHP GD) which need to be compiled with support for it.

I switched the PHP version from 7.0 to 7.4. Now I can upload static Webp, but still cannot upload dynamic Webp

Although it is a bit inadequate, it can temporarily meet daily needs
 
I'm sorry, but animated WebP is not supported. Animated support is for both GIF and APNG due to technical limitations.
 
Back
Top