Adding class to image-link in render array In the render array of an image with link, i tried to add the class 'colorbox-load' to the link, i.e. the &lt;a&gt; tag of the link, but i can't get the adding of the class to work:

$node = node_load(52);
$my_image = field_view_value('node', $node, 'field_image', $my_image[0], array(
          'type' =&gt; 'image',
          'settings' =&gt; array(
          'image_style' =&gt; 'thumbnail',
          'image_link' =&gt; 'content',
          ),
        ));

$my_image['#path']['path'] = 'http://www.example.com';
$my_image['#attributes']['class'][] = 'colorbox-load';


What am i doing wrong?
To get your class on the image's link you'll need to set it in the path options:

$my_image['#path']['options']['attributes']['class'][] = 'colorbox-load';