As far as I can tell, this isn't exposed in pywebp.
This would be a useful feature for me, because I'm using CloudFlare images with has a hard 10MB cap on image size. It would be nice to just set the file size to just under 10MB and remove guesswork about appropriate Q values.
The webp API supports saving with a "target_size" parameter to limit the maximum size of the resulting file.
https://developers.google.com/speed/webp/docs/api
As far as I can tell, this isn't exposed in pywebp.
This would be a useful feature for me, because I'm using CloudFlare images with has a hard 10MB cap on image size. It would be nice to just set the file size to just under 10MB and remove guesswork about appropriate Q values.
See also: