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 year ago
30
?

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).

a year ago
5
?

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

10 months ago
1
?

It would save time if we could have options based on the file type. Like, if the file is jpg, then convert to webp, but if the file is gif then convert to png.

10 months ago
3
?

webp and even more important: avif!

8 months ago
3
?

It would be so great to be able to use webp but much more avif!

8 months ago
4
?

please please please please please please please please please please please please please pretty please with sugar on top 🙏

8 months ago
1
?

Yes Avif would be important for me too – like Kirby handling all that conversions etc – upload a jpeg or png and make a scrset (valid, with sizes) with avif and webp …that’ll be the dream!

7 months ago
3
M

Before we get lost in details about what crazy features could be added, I think most of us would be super happy already, if WebM and Avif would simply be natively supported. :)

3 months ago
1

I agree. Let’s make sure to first support it before we get lost in elaborate auto-detecting browser support or auto-selecting smallest.

3 months ago
1

Status of support by libraries:

3 months ago
Changed the status to
Planned
3 months ago
1
Changed the status to
In progress
3 months ago
3
Changed the status to
In upcoming releases
3 months ago
6

​Something like this integrated natively would be super great to make it much easier to always provide the “best” image automatically:
https://www.industrialempathy.com/posts/image-optimizations

a month ago
?

OMG, are we getting AVIF, too, on 3.6? 🙏

5 days ago