AVIF files can't be cropped

I’m not sure why but when I upload an AVIF image, it won’t be cropped where as a jpg or png would be

<?= $image->crop(480, 270)->url() ?>

I’m using the IM driver

Is this a bug?

It’s currently not listed as resizable image: kirby/src/Image/Image.php at main · getkirby/kirby · GitHub

It should work when you add it (as long as

\Kirby\Image\Image::$resizableTypes[] = 'avif';

Wondering myself if the time is ready to add it by default to that list (with the different image drivers having caught up to the format).

1 Like