diff --git a/adaptive_image.image.inc b/adaptive_image.image.inc index 04681a635e3b776feaff214813b9f19d5ef5c0a5..3a0e3df58c17af2ad65e84288186b14fd3445bf4 100644 --- a/adaptive_image.image.inc +++ b/adaptive_image.image.inc @@ -37,8 +37,13 @@ function adaptive_image_style_deliver($style, $scheme) { drupal_exit(); } - $style['effects'][1]['data']['width'] = $resolution; - $style['effects'][1]['data']['height'] = NULL; + foreach ($style['effects'] as $id => $effect) { + if ($effect['name'] == 'adaptive_image') { + $style['effects'][$id]['data']['width'] = $resolution; + $style['effects'][$id]['data']['height'] = NULL; + break; + } + } $args = func_get_args(); array_shift($args);