New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thumbnail creation doesn't work as expected when using webp #4145
Comments
Which thumb driver are you using? https://getkirby.com/docs/reference/system/options/thumbs#thumbs-driver |
Yes, default (changed no setting for that). Update: Just switched to |
I've tested your settings on Starterkit 3.6.2 and works great for me. Don't forget:Smaller image widthIf the image width (for ex: 800x600px) is less than the desired (1950px) width, the full size (800px) is displayed. Crop optionIf you do not want the above situation, you can use the 'thumbs' => [
'format' => 'webp',
'presets' => [
'1950w' => ['width' => 1950, 'quality' => 30, 'crop' => true],
]
], |
@andreasotto Have you tried my last post? |
Maybe your GD and IM installations don't support webp yet. It has been introduced in more recent versions. |
Debian 11.2 Everything is up-to-date Converting to webp seems to work, but the file is not resized.
Template:
Result: As you can see, the image is 4.4 mb and has not been resized. What can i do to deliver better information to find the problem? |
I can't reproduce the issue, at least not with images that are larger than the target size. An image that was smaller than the target size was blown up though, tested with PHP 8.1 on Mac with Laravel Valet. |
It does not work on Linux (latest Debian, latest PHP8). Maybe there are some system libraries missing. But that means we need some more documentation of dependencies. But these are all just guesses. The fact is that images from other formats are not converted to WebP in this configuration:
Installed package: gd is configured with
I have loaded jpg and other formats into Kirby. The output format chosen was webp. The images look like they would habe been converted to webp, but the size is not changed. So the images are way too big to use in the website. But in reality, no image has been created in the media folder. There is only a job file, but no image has been saved: content of jobs file:
This looks like the webp conversion is not working, but unfortunately no error message is displayed either. |
It worked. The key point was the configuration of
|
@andreasotto Closing the issue then, right? |
Maybe a short discussion about the requirements or dependencies would be useful, because I think there are two aspects:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
Description
Thumbnail creation doesn't work as expected when using
'format' => 'webp'
.As soon as one switches the
format
towebp
, the creation of thumbs doesn't work any more. Although images are converted to webp, as expected, the image has not the right size. Instead of that, the original, full size is given out.Expected behavior
Even if webp format is used, the thumb settings should be taken into account and the thumbs should be generated in the required size.
To reproduce
Setup
config.php
with these settings:Then use in a template like this:
Result:
Kirby Version
3.6.1.1
The text was updated successfully, but these errors were encountered: