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

maulayyacyber's avatar

Upload Image and Resize to Digital Ocean Spaces

I try upload image and resize to digital ocean spaces, but resize image not working and still same size, this is my code

        $image = $request->file('image');

        /**
         * save resize image
         */

        $thumb_uploads = env('CLOUD_POSTS_IMAGE_THUMB');

        $image_resize = Image::make($image->getRealPath());

        $image_resize->resize(50, 50, function ($constraint) {

            $constraint->aspectRatio();

        })->save(Storage::disk('spaces')->put($thumb_uploads .'/'.$image->hashName(), file_get_contents($image), 'public'));

Please help me, thanks

0 likes
1 reply

Please or to participate in this conversation.