Sorry, we don't support your browser.  Install a modern browser

File 'format' option in thumb() driver - to convert to WebP, AVIF, etc.#160

The built-in thumb() driver always saves images in JPG format. Newer, better formats exist, and have become standardised - such as WebP. Newer, even better formats are already on the horizon - like AVIF. Some page metric tools - like Google’s PageSpeed - will actually penalise your ranking if your images are saved in “legacy” formats, like JPG or PNG.

Kirby uses gd or imagemagick to process images behind the scenes, and both these packages already support converting images to WebP. Both packages are also working on supporting AVIF already. It would be great if Kirby could allow us to choose the format we prefer our images saved to, perhaps with a “format:” config option.

Depending on the chosen format, other options might be available - WebP has more settings than JPG - but Kirby could provide generic defaults, just as it does now for JPG. This would ensure that the syntax could be extended, without breaking backwards compatibility with old code.

a month ago
3
?

I have a few photographer clients - every image > 10Mb. I have to resize every image on the site, no exception. Being able to save them as lossless WebP would be amazing, and help me get more work (no loss of quality is important for photographers).

22 days ago
?

Big Sur is out, so now saving to webp is even more important - we can’t give the clients any more excuses…

10 days ago