Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TimiAde's avatar

How to Resize an Image in Tinymce and save it to path

I am getting HTTP error 500 when i try to upload image in tinymce becuase i want to resize it before saving it

$fileName=$request->file('file')->getClientOriginalName();
        $path = $request->file('file')->storeAs('uploads', $fileName, 'public');
        $image = Image::make($path)->resize(400,400);
        Log::debug($path);
        Log::debug($image);

How can i go about it

I tried to log errors and what i got is

local.ERROR: Image source not readable {"userId":21,"exception":"[object] (Intervention\Image\Exception\NotReadableException(code: 0): Image source not readable at /Users/admin/Documents/code/naijawakeup/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php:351)
[stacktrace]
#0 /Users/admin/Documents/code/naijawakeup/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php(66): Intervention\Image\AbstractDecoder->init('uploads/blobid1...')
0 likes
0 replies

Please or to participate in this conversation.