From 48b608053638562c9f63d70f3513981d5a34bb2d Mon Sep 17 00:00:00 2001 From: Mansoor Khan Date: Tue, 9 Nov 2021 22:37:54 +0500 Subject: [PATCH] Update defining-conversions.md This Pull Request updates `defining-conversions.md` by adding an example for crop method. This is a useful feature and I could not find it in docs. --- docs/converting-images/defining-conversions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/converting-images/defining-conversions.md b/docs/converting-images/defining-conversions.md index eddd31de4..3a99a4e53 100644 --- a/docs/converting-images/defining-conversions.md +++ b/docs/converting-images/defining-conversions.md @@ -77,6 +77,9 @@ use Spatie\Image\Manipulations; $this->addMediaConversion('old-picture') ->sepia() ->border(10, 'black', Manipulations::BORDER_OVERLAY); + + $this->addMediaConversion('thumb-cropped') + ->crop('crop-center', 400, 400); // Trim or crop the image to the center for sepecified width and height. } ```