Download the PHP package robotkudos/rkimage without Composer
On this page you can find all versions of the php package robotkudos/rkimage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download robotkudos/rkimage
More information about robotkudos/rkimage
Files in robotkudos/rkimage
Package rkimage
Short Description Image resizer and watermarker for Laravel.
License MIT
Informations about the package rkimage
RobotKudos RKImage
Image resizer and watermarker for Laravel.
Install
composer require robotkudos/rkimage
Usage
Docs
ImageUploader Class
new ImageUploader($saveRetina = true, $pathToSave = 'img/')
Create a new ImageUploader
class.
bool $saveRetina
Another version of the image will be saved with twice as big for higher resolution screens.
string $pathToSave
The path for the image to be saved in. Must end with /
save()
save($path, Size $size, Watermark $watermark = null, Size $thumb = null, $quality = 80)
Save the image on the public folder, returns the full path of the files saved in an array.
string $path
Path to the image to be saved. Most of the times, it should be $request->yourInputName->path()
Size $size
Size of image to be saved. This is for normal pixel size, for retina it will be doubled automatically. new Size($width, $height)
Watermark $watermark
If you need to add watermark, send null if no watermark is required. new Watermark($pos, $watermarkImagePath = null, $retinaWatermarkImagePath = null, $text = null, Font $font = null)
Size $thumb
Size for thumb, null if no thumb is required, will created retina version of thumb is specified on Class creation.
$quality
Quality of the image.