Download the PHP package hungnm1518/laravel-thumbnail without Composer
On this page you can find all versions of the php package hungnm1518/laravel-thumbnail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hungnm1518/laravel-thumbnail
More information about hungnm1518/laravel-thumbnail
Files in hungnm1518/laravel-thumbnail
Download hungnm1518/laravel-thumbnail
More information about hungnm1518/laravel-thumbnail
Files in hungnm1518/laravel-thumbnail
Vendor hungnm1518
Package laravel-thumbnail
Short Description Laravel Package to resize images on the fly by Hung Nguyen
License MIT
Homepage https://fb.com/hungnm1518/
Package laravel-thumbnail
Short Description Laravel Package to resize images on the fly by Hung Nguyen
License MIT
Homepage https://fb.com/hungnm1518/
Please rate this library. Is it a good library?
Informations about the package laravel-thumbnail
Laravel Thumbnail
Laravel Package to resize images on the fly.
Using Thumbnail facade you will get resized images' paths on the fly. If an image resizing with same dimensions has been already requested before, the package will return the cached image from the previous request. Cached images are stored in "thumbs" folder inside your images root path.
Installation
1. composer require hungnm1518/laravel-thumbnail
2. in config/app.php add in providers: HungNM\LaravelThumbnail\LaravelThumbnailServiceProvider::class
3. in config/app.php add in aliases: 'Thumbnail' => HungNM\LaravelThumbnail\Facades\LaravelThumbnail::class
4. php artisan vendor:publish --provider="HungNM\LaravelThumbnail\LaravelThumbnailServiceProvider" --tag=config
How to use
In your blade view insert:
<img src="{{Thumbnail::generate("test.png", 800, 300)}}" />
thumb function takes 4 parameters:
1. path of image (change root path in config/thumb.php
2. $width (nullable)
3. $height (nullable)
4. $type (by default = fit). Types are:
a. "fit" - best fit possible for given width & height
b. "resize" - exact resize of image
c. "background" - fit image perfectly keeping ratio and adding black background
d. "resizeCanvas" - keep only center
All versions of laravel-thumbnail with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4|^8.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
intervention/image Version ^3.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
intervention/image Version ^3.0
The package hungnm1518/laravel-thumbnail contains the following files
Loading the files please wait ....