-
Notifications
You must be signed in to change notification settings - Fork 24
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
webp not compressing properly in Debian Bookworm #235
Comments
Did a couple more tests with larger output dimensions. webp definitely seems to be working, just not as efficiently as cwebp:
File size: 41kb
File size: 24kb |
Hello @binaryfire, I had a go here. I made a test 16x16 pixel file like this:
Then compressed with
So both 44 bytes. This is libvips 8.15.2 on ubuntu 23.10 with libwebp 1.2.4. |
Thanks for the info @jcupitt. I haven't tested using the CLI. Do you get the same results using |
I've not tested, but it's all the same functions underneath, so it should be the same, yes. |
Same problem with the CLI in Debian Bookworm. Original file: https://images.pexels.com/photos/813011/pexels-photo-813011.jpeg Commands:
This is the Docker image I'm using (it's the main php-cli image): https://hub.docker.com/r/library/php/tags?page=1&name=cli-bookworm. I've added the |
@jcupitt Interesting - it's Debian-specific. Results in an Ubuntu 22.04 container: Is it possible there's an issue with the Debian packages? |
I've created a reproduction repository: https://github.com/binaryfire/vips-webp-debian-issue. You just need to clone the repo and run:
Then check out the generated files. This is test.sh I didn't bother creating an Ubuntu Dockerfile since the same thing is working as expected there. |
The debian libvips and libwebp might just be very old. They are extremely conservative. |
Ah the ChangeLog notes a fix in 8.14.2:
So update libvips to fix this. |
Hi @jcupitt
I'm having some strange issues with generating
webp
images with php-vips on Debian bookworm. The output file sizes are very large compared to using cwebp. Here are the results from generating a 16px webp from a 1200x1200 jpg:File size: ~24kb
File size: 166 bytes (which is what I was expecting)
Even the jpg and png versions generated by php-vips are smaller than the webp version:
File size: 620 bytes
File size: 920 bytes
Any idea what might be happening?
libvips
andlibwebp7
are both installed, and changing the Q value does change the file size (eg.'Q' => 100
creates bigger files than'Q' => 20
). So I'm assuming webp is working.The 16px images are saved as base64 and used as part of my LQIP system, so they need to be 100-200 bytes. I've switched over to cwebp for now but I'd like to get it working with php-vips if possible.
The text was updated successfully, but these errors were encountered: