diff --git a/src/Controllers/ResizeController.php b/src/Controllers/ResizeController.php index a3233926..e733eaeb 100644 --- a/src/Controllers/ResizeController.php +++ b/src/Controllers/ResizeController.php @@ -19,7 +19,11 @@ public function getResize() $ratio = 1.0; $image = request('img'); - $original_image = Image::make($this->lfm->setName($image)->path('absolute')); + if (class_exists(InterventionImageV2::class)) { + $original_image = InterventionImageV2::make($this->lfm->setName($image)->path('absolute')); + } else { + $original_image = InterventionImageV3::read($this->lfm->setName($image)->path('absolute')); + } $original_width = $original_image->width(); $original_height = $original_image->height();