A simple lite script that make thumbnails from original images

1.4.1 2020-05-27 00:00 UTC

This package is auto-updated.

Last update: 2023-01-29 03:48:39 UTC


Total Downloads Version License

This script converts the original image into a thumbnail with the given sizes and various modes

Modes: «cover», «contain».

Available extensions: «jpg / jpeg», «png», «gif».


use Illuminate\Http\Request;
use Kudrya\LaraThumb\LaraThumb

class MakeThumbnail()
  public function run(Request $request, int $width = 100, int $height = 100)
    $file = $request->file('image');
    LaraThumb::processing($file, $width, $height, 'cover', false)
    // That's all, your image was reduced!
    // Then save the $file or do what you need with it...