PHP code example of rolandstarke / laravel-thumbnail
1. Go to this page and download the library: Download rolandstarke/laravel-thumbnail library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rolandstarke / laravel-thumbnail example snippets
<img src="{{ Thumbnail::src($path)->crop(64, 64)->url() }}" />
//load image from dir
\Thumbnail::src(public_path('images/example.jpeg'));
//load image from Storage::disk('local')
\Thumbnail::src('userimage.jpg', 'local' /* disk */);
//load image from website
\Thumbnail::src('https://picsum.photos/200');