1
0
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:
Awilum
2021-09-01 20:59:55 +03:00
parent 3643831430
commit 4514b8946e
2 changed files with 7 additions and 1 deletions

View File

@@ -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(),

View File

@@ -683,6 +683,9 @@ upload:
images:
driver: gd
directory: '/uploads'
max_image_size:
width: 2000
height: 2000
watermarks:
directory: '/watermarks'
cache: