Laravel Image manager, uploader, cropper. User also can create different versions of images for different devices like desktop, tablet, mobile etc.
Create a directory named packages
in your project root. Download the zip version of the package and unpack it and put the directory
named tasmnaguib_imagemanager
into this newly created directory.
After that add the following in your main composer.json file:
"repositories": [
{
"type": "path",
"url": "./packages/tasmnaguib_imagemanager",
"options": {
"symlink": true
}
}
],
"require": {
"tasmnaguib/imagemanager": "dev-master"
},
After that in the console run:
composer update
Publish config file and assets using the following commands:
php artisan vendor:publish --tag=imagemanager_config
php artisan vendor:publish --tag=imagemanager_assets
After publishing the config, you'll find a new config file named imagemanager.php in the config directory. Here you'll find the following important options:
admin_url_prefix
: Url Prefix for admin paneladmin_middleware
: Admin auth middlewarequality
: default quality (0 to 100) of the uploaded imagethumbnail_size
: Thumbnail image size in pxstorage.disk
: Name of the storage engine you're using (ie, s3, local, public etc)
Note: If you're using local or public storage then don't forget the run php artisan storage:link
After setting up the configuration properly, if you go the url: http://[domainname]/[]admin_url_prefix]/imagemanager, you'll see the directories and images in your storage file system. You can do the following things:
- Upload new images
- Crop images in various predefined ratios (ie 16:9, 3:2 etc) while uploading
- Create separate versions of images to display in tablet, mobile, desktop and also for thumbnail size while uploading
- Delete images and directories (single click for selection and crl + click for multi selection)
- Browse storage file system (double click the directory to enter it)
- Move images and directories
- Rename images and directories
In order to properly integrate this package with your admin theme or section, you can customize package's [package dir]/resources/views/index.blade.php
tempalte file.
This file is using a simplified master blade layout template ([package dir]/resources/views/master_clean.blade.php
), you can use your own master layout template file.
In order customzie the [package dir]/resources/views/index.blade.php
file, copy it to resources/views/vendor/imagemanager
directory and then customize it.
- Vue.js
- Cropper.js for image cropping
- jquery
The MIT License (MIT). Please see License File for more information.