Skip to content
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

Add option to lossy or lossless with value #1

Open
solracsf opened this issue Dec 28, 2016 · 1 comment
Open

Add option to lossy or lossless with value #1

solracsf opened this issue Dec 28, 2016 · 1 comment

Comments

@solracsf
Copy link

solracsf commented Dec 28, 2016

Add two simple inputs on the plugin Admin:

  • choice between lossy or lossless
  • if lossy, specify the compression factor for RGB channels between 0 and 100

Then pass those params to exec("$cwebp -quiet $imagePath -o $webpPath"); like

exec("$cwebp -quiet -lossless $imagePath -o $webpPath");

Doc: https://developers.google.com/speed/webp/docs/cwebp

@jissereitsma
Copy link
Collaborator

Unfortunately the PHP function for converting WebP does not have this option (http://php.net/manual/en/function.imagewebp.php), only the CLI option has. So instead of configuring bin/webp as your binary, why not simply set bin/webp -lossless?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants