Open solracsf opened 7 years ago
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
?
Add two simple inputs on the plugin Admin:
lossy
orlossless
lossy
, specify the compression factor for RGB channels between 0 and 100Then pass those params to
exec("$cwebp -quiet $imagePath -o $webpPath");
likeexec("$cwebp -quiet -lossless $imagePath -o $webpPath");
Doc: https://developers.google.com/speed/webp/docs/cwebp