Image Uploading With Thumbnail Creation in Laravel 5.3

In my previous post explains about  image uploading in laravel 5.3. Thumbnail creation is important while uploading image because reduce loading time of page. For creating thumbnail i used Intervention Image library. Intervention image is an open source library used for image manipulations. Just follow the below steps.

step 1 : Installing intervention package

step 2 : Register  intervention package

After installing intervention image package we need to register in app.php file

step 3 : Define routing

step 4 : controller

Write the following code in app/Http/Controllers/UploadController.php

step 5 : view for thumbnail

Declare and write following code in Resources/views/upload/thumbnail.blade.php

Sample screen shorts :

1-thumbnail-creation-in-laravel 2-thumbnail-creation-in-laravel 3-thumbnail-creation-in-laravel

  • Rifki Carlos Rinaldi

    nice, but there’s a teeny weeny mistake in the controller line 17 :

    $input[‘imagename’] = mt_rand(999,999999).”_”.time().”_”.$image->getClientOriginalExtension();

    >>>> on “.time().”_” , it should be a dot “.” not underscore, so :

    >>>> “.time().”.”