Download the PHP package kujjs/resize-image without Composer
On this page you can find all versions of the php package kujjs/resize-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package resize-image
Image Resizing Package for Laravel 5.* (update 17/09/2017)
Based on anakadote/laravel-5-image-manager.
Resize images with predefined sizes in config / imageManager.php
Attention!!!!!!!!!!!!
important changes were made in how to obtain the cropped images, please read the new documentation.
If you don't want to replace the changes but want to use Auto-Discovery you can use version 5.5.0
Install
Edit your project's composer.json
Add the service provider. config/app.php
If not use Auto-Discovery your add next alias in config/app.php
And run the following command
Usage
Set sizes in config/imageManager.php
Property | Description | |
---|---|---|
width |
required | The width of the generated image in pixels. |
height |
required | The height of the generated image in pixels. |
mode |
required | Defines the way the image will be transformed. See the table below for accepted modes |
quality |
required | The quality that will have the final image. range 0-100 |
Mode | Description |
---|---|
crop |
Will smart crop an image to make it fit the desired dimensions. It will cut content of the image off the top/bottom and sides if required to preserve the aspect ratio. |
fit |
Fit while maintaining aspect ratio |
fit-x |
Fit to the given width while maintaining aspect ratio |
fit-y |
Fit to the given height while maintaining aspect ratio |
Image::make($file , $size='thumbnail'))
Return
Property | Description | |
---|---|---|
File |
required (string) | The fully qualified name of image file. The file must reside in your app's public directory. You'll need to grant write access by the web server to the public directory and its children |
Size Name |
(optional) (string) | The name of the size that is defined in config/imageManager.php. |
get full url
toUrl()
return
Get tag img
toHtml( $attributes = [] )
Return
Or
Return
Property | Description | |
---|---|---|
attributes |
optional (array) | Attributes html you can inset in the tag img |
Remove
Image::delete($file)
remove image with all size declarade in config/imageManager.php
License
The MIT License (MIT). Please see License File for more information.
All versions of resize-image with dependencies
PHP Build Version
Package Version
Requires
anakadote/laravel-5-image-manager Version
dev-master
php Version ^7.1.3
illuminate/support Version >=5.8
php Version ^7.1.3
illuminate/support Version >=5.8
The package kujjs/resize-image contains the following files
Loading the files please wait ....