JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 98 forks source link

Allow to create output in webp #163

Closed micker closed 3 years ago

micker commented 3 years ago

hello it possible to convert any image in webp in fly ?

denysdesign commented 3 years ago

hello it possible to convert any image in webp in fly ?

Yes!

micker commented 3 years ago

sorry can you explain more where i can find it

micker commented 3 years ago

I didnt find it in documentation...

JamesHeinrich commented 3 years ago

If you're trying to output in webp format (and your server supports doing so) setting the output format to webp (e.g. &f=webp) should be all that's needed. I added the missing formats to the documentation in https://github.com/JamesHeinrich/phpThumb/commit/d1ca56cf26d57f42484191dba1d55d65867eb789

micker commented 3 years ago

thanks !

badbadmonkey commented 1 year ago

James, how does one control the quality in Webp or other lossy formats like AVIF, is the q factor used same as JPEG?

Equally, how does one specify generation of lossless Webp etc? Is it q=100? If so this makes it a 'special' number, different to q=100 in JPEG.

Anyway whatever the answer it should be clear in the docs.