diff --git a/src/Conversions/Manipulations.php b/src/Conversions/Manipulations.php index f69114aae..0f54226fa 100644 --- a/src/Conversions/Manipulations.php +++ b/src/Conversions/Manipulations.php @@ -9,6 +9,7 @@ use Spatie\Image\Enums\CropPosition; use Spatie\Image\Enums\Fit; use Spatie\Image\Enums\FlipDirection; +use Spatie\Image\Enums\Orientation; /** @mixin \Spatie\Image\Drivers\ImageDriver */ class Manipulations @@ -59,6 +60,7 @@ public function apply(ImageDriver $image): void { foreach ($this->manipulations as $manipulationName => $parameters) { $parameters = $this->transformParameters($manipulationName, $parameters); + ray('apply', $manipulationName, gettype($parameters), $parameters)->orange(); $image->$manipulationName(...$parameters); } } @@ -129,6 +131,11 @@ public function transformParameters(int|string $manipulationName, mixed $paramet $parameters['flip'] = FlipDirection::from($parameters['flip']); } break; + case 'orientation': + if (isset($parameters['orientation']) && ! $parameters['orientation'] instanceof Orientation) { + $parameters['orientation'] = Orientation::from($parameters['orientation']); + } + break; default: break; }