diff --git a/code/ResponsiveImageExtension.php b/code/ResponsiveImageExtension.php index b258b18..2ef1e0f 100644 --- a/code/ResponsiveImageExtension.php +++ b/code/ResponsiveImageExtension.php @@ -130,11 +130,17 @@ protected function createResponsiveSet($config, $defaultArgs, $set) ])); } + if (isset($config['css_classes'])) { + $extraClasses = $config['css_classes']; + } else { + $extraClasses = Config::inst()->get(__CLASS__, 'default_css_classes'); + } + $templatePath = isset($config['template']) ? $config['template'] : 'Includes/ResponsiveImageSet'; return $this->owner->customise([ 'Sizes' => $sizes, - + 'ExtraClasses' => $extraClasses, 'DefaultImage' => $this->getResampledImage($methodName, $defaultArgs) ])->renderWith($templatePath); }