What version of IM do I need to use format option with crop?

On my fortrabbit server running PHP 8.0, I’m using the IM driver but not seeing the ‘format’ option under crop() do anything. It falls back to my default ‘webp’ format that I set in the config.

The following code…

<img src="<?= $image->crop(270, 195, ['format' => 'jpg', 'quality' => 80])->url() ?>" ?>

outputs…

<img src="https://example-image-270x195-crop-q80.webp" />

You have to use the thumb() method if you want to use format

Thank you @pixelijn. And is there a way to crop with the thumb() method as well?

Yes, pass the crop key in the array

'crop' => 'center'