mirror of
https://github.com/flextype/flextype.git
synced 2025-08-11 15:44:49 +02:00
feat(images): add ability to set max images size for Images service
This commit is contained in:
@@ -367,11 +367,14 @@ container()->set('images', static function () {
|
||||
// Set image manager
|
||||
$imageManager = new ImageManager($imagesSettings);
|
||||
|
||||
// Set max image size
|
||||
$maxImageSize = registry()->get('flextype.settings.images.max_image_size.width') * registry()->get('flextype.settings.images.max_image_size.height');
|
||||
|
||||
// Set manipulators
|
||||
$manipulators = [
|
||||
new Orientation(),
|
||||
new Crop(),
|
||||
new Size(),
|
||||
new Size($maxImageSize),
|
||||
new Brightness(),
|
||||
new Contrast(),
|
||||
new Gamma(),
|
||||
|
@@ -683,6 +683,9 @@ upload:
|
||||
images:
|
||||
driver: gd
|
||||
directory: '/uploads'
|
||||
max_image_size:
|
||||
width: 2000
|
||||
height: 2000
|
||||
watermarks:
|
||||
directory: '/watermarks'
|
||||
cache:
|
||||
|
Reference in New Issue
Block a user