yireo-joomla / plg_system_webp

GNU General Public License v3.0
2 stars 2 forks source link

Add option to lossy or lossless with value #1

Open solracsf opened 7 years ago

solracsf commented 7 years ago

Add two simple inputs on the plugin Admin:

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 commented 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?