Hello all!
New version = new features:
Now you can host your images on any remote filesystem supported by laravel (you only need to setup your disk at config/filesystems). Nothing changes in your workflow. Thumnails are created and saved for you at the specified filesystem. You can still generete urls for your images. All you have to do is set some configuration values in config/image.php
'versions' => [
/*
| Set the disk that you want to use. Can be any disk defined in 'filesystems.php'
| Leave null to default to your public folder.
*/
'disk' => 's3',
/*
| You can set here the endpoind of you filesystem. This will be used to get a url for
| images with $image->url() methid . Leave it null if you are using the public folder
*/
'root_url' => 'http://my-bucket.s3-website-eu-west-1.amazonaws.com',
]
Imagick was dropped in favor of the excellent Intervention package. It is more laravel-friendly® and support multiple image libraries.
You can chain callback functions that will be executed before retreiving an image. eg:
$thumb = $photo->beforeTransformation(function(Image $image){
$image->crop(200, 200);
})->version(vGrayscale::class);
Need anything else? Open an issue at igaster/laravel-image-versions
Cheers!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community