I’m working my way towards creating responsive images using the following guide:
My images are a mix of JPEG, PNG and SVG.
My code is resulting in different sized JPEGs and PNGs and I’m pleased to see that the SVG images are untouched. I’m not ending up with
So that’s good news. I presume this is as it should be – that Kirby is clever enough to leave SVG alone?
Kirby only resizes these image types by default:
public static array $resizableTypes = [
Oh, hang on, what about AVIF images?
Not yet there. Usually, you would probably not upload AVIF images as source files, I guess.
But you can extend the
$resizableTypes array to support
avif if needed.
Okay, so I can’t by default resize AVIF source files. But Kirby can generate responsive resized AVIF files?
I cannot answer that question, because it might depend on the underlying library that does the resizing, either SimpleImage or ImageMagick, so if they support it, Kirby can support it.
Got you. That’s great. Thanks