From a08abad40084e709b9c97deca07924bd096bf2c7 Mon Sep 17 00:00:00 2001 From: Mike Byrne Date: Thu, 5 Dec 2024 12:26:15 +0000 Subject: [PATCH] use dimensions sent from frontend when storing image --- src/Http/Controllers/Admin/MediaLibraryController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Http/Controllers/Admin/MediaLibraryController.php b/src/Http/Controllers/Admin/MediaLibraryController.php index 6b11e2b75..fee292e37 100644 --- a/src/Http/Controllers/Admin/MediaLibraryController.php +++ b/src/Http/Controllers/Admin/MediaLibraryController.php @@ -187,6 +187,11 @@ public function storeFile($request) [$w, $h] = getimagesize($uploadedFile->path()); + if ($request->input('width') && $request->input('height')) { + $w = $request->input('width'); + $h = $request->input('height'); + } + $uploadedFile->storeAs($fileDirectory, $filename, $disk); $fields = [