Download the PHP package mindshaker/image-upload without Composer
On this page you can find all versions of the php package mindshaker/image-upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mindshaker/image-upload
More information about mindshaker/image-upload
Files in mindshaker/image-upload
Informations about the package image-upload
Laravel Image Upload
This package makes image upload easy. It uses Intervention Image under the hood.
Installation
Require this package, with Composer, in the root directory of your project.
Configuration
There are some default configurations
You can change this values by publishing this configuration file
If you want to make your images private (blocked by auth for example), you'll need to add a new disk in config/filesystems.php
and put this in the disks array
Usage
There are only a few methods, you can call the upload
method to upload a image that will be edited to the given dimensions or cropped. The image will be saved to the public_path set in the configurations and be given a random name or the name of the original file.
The upload function returns the image name with additional path if set (see bellow)
To add an additional path
To give specific name to the uploaded file, if set it will ignore the configuration random_name
To define the format of the image uploaded (e.g. png, jpg, webp, etc..)
To define the quality of the image, default 75.
You can delete images by calling the method delete($image, $private = false)
where $image
is the name returned from the upload()
method
Basic Examples
Adavanced Usage
If you want more than just resizing and cropping the images, you can call the method manager()
and edit the image like it's an Intervention Image. This is a substitute to the upload method, all the other methods still work (Like path()
, name()
and format()
). After editing, to upload the image you can call the method save()
to upload the image to the specified path and format.
Example
All versions of image-upload with dependencies
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
intervention/image Version ^3.4