Sorry, we don't support your browser.  Install a modern browser
This post is closed.

Make thumb driver creation easier#110

S

When working with AVIF, a next-gen image format, Kirby won’t resize it because the internal check doesn’t recognize it as ‘resizable’. This might be accomplished by implementing a custom thumb method which doesn’t rely on checking if isResizable, but I don’t want to break third-party plugins and their thumb methods.

Furthermore, it is unclear why Kirby, by itself not involved in the resize process (GD & Imagick are), deems some formats resizable, hardcoding the decision. For now, there’s no way to hook into that. IMHO, removing hardcoded resize definitions altogether might be something to consider. Otherwise, we should at least be able to extend it.

For more information, see this forum thread or the related issue on GitHub.

4 years ago
1
?

I think the latest Kirby can now understand avif. Not sure whether it can apply all the thumb() functions to it, though…

4 years ago
S

Have a look at my plugin kirby3-colorist and the discussions on GitHub, just search for AVIF. We can’t reliably resize AVIF even with 3.4.4 without either a) replacing file::version method (which I did in my plugin) so that Kirby doesn’t check for $isResizable (which doesn’t support AVIF atm) or b) overwriting thumb() which may break compatibility with other plugins.

All 3.4.4 does in that regard is “recognise” AVIF, which basically - and sadly - means nothing. If however the Imagick/ImageMagick install on your server supports AVIF, resizing etc may work.

If you want to work with AVIF today, my plugin is the way to go!

4 years ago

Should be solved with Kirby 3.6!?

3 years ago
?

I know Kirby 3.6 is going to support webp, but will it support avif, too?

3 years ago

Can be customised by adding format to static array Kirby\Image\Image::$resizableTypes

a year ago
Changed the status to
Completed
a year ago