diff --git a/classes/image/driver.php b/classes/image/driver.php index 0e8e221a86..b733d180e2 100644 --- a/classes/image/driver.php +++ b/classes/image/driver.php @@ -83,10 +83,10 @@ public function config($index = null, $value = null) public function preset($name) { $vars = func_get_args(); - if (isset($this->config['presets'][$name])) + if (\Arr::get($this->config['presets'], $name)) { $old_config = $this->config; - $this->config = array_merge($this->config, $this->config['presets'][$name]); + $this->config = array_merge($this->config, \Arr::get($this->config['presets'], $name)); foreach ($this->config['actions'] AS $action) { $func = $action[0]; diff --git a/config/image.php b/config/image.php index 4e569539c1..50e4e7aaec 100644 --- a/config/image.php +++ b/config/image.php @@ -176,7 +176,24 @@ * array('rounded', 10), * array('output', 'png') * ) - * ) + * ), + * 'example_multilevel' => array( + * 'thumbnail' => array( + * 'quality' => 100, + * 'bgcolor' => null, + * 'actions' => array( + * array('crop_resize', 175, 175) + * ) + * ), + * 'preview' => array( + * 'quality' => 100, + * 'bgcolor' => null, + * 'actions' => array( + * array('crop_resize', 200, 400) + * ) + * ) + * ) + * * * [!] WARNING: *