Is it possible to add class to image, not to its wrapper? Like <img class="someclass">

Comments

Deciphered’s picture

Status: Active » Fixed

Yes, but...

Due to the field token situation in Drupal 7 it's not as easy as it could be. If you are after a non-coding approach, see #1511830: Fix Token engine

Otherwise, you could make a PHP formatter something like:

return theme('image', array(
  'path' => $items[0]['uri'],
  'attributes' => array(
    'class' => array('YOUR CLASS HERE'),
  ),
));

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.