How to add classes to some images in a multi value image field? I have content type with a multi value image field. When adding images is it possible to add a class to some of these images? The mark up I'm trying to achieve is some thing like:

&lt;div class="field-item even"&gt;
&lt;div class="field-item odd"&gt;
&lt;div class="field-item even"&gt;
&lt;div class="field-item odd my-class"&gt;
&lt;div class="field-item even my-class"&gt;
&lt;div class="field-item odd"&gt;


So when creating a new node I would like to add 'my-class' to come of the images. I've looked as Field Formatter modules but these seem to add the class on all items in the field.
You can create a tpl.php file for your image field.    

Possible override templates are:

field.tpl.php
field--field-type.tpl.php
field--field-name.tpl.php
field--content-type.tpl.php
field--field-name--content-type.tpl.php


code for field--field-name.tpl.php file as below. 

 &lt;?php

/**
 * @file field--field-name.tpl.php
 * Default template implementation to display the value of a field.
 *
 * This file is not used and is here as a starting point for customization only.
 * @see theme_field()
 *
 * Available variables:
 * - $items: An array of field values. Use render() to output them.
 * - $label: The item label.
 * - $label_hidden: Whether the label display is set to 'hidden'.
 * - $classes: String of classes that can be used to style contextually through
 *   CSS. It can be manipulated through the variable $classes_array from
 *   preprocess functions. The default values can be one or more of the
 *   following:
 *   - field: The current template type, i.e., "theming hook".
 *   - field-name-[field_name]: The current field name. For example, if the
 *     field name is "field_description" it would result in
 *     "field-name-field-description".
 *   - field-type-[field_type]: The current field type. For example, if the
 *     field type is "text" it would result in "field-type-text".
 *   - field-label-[label_display]: The current label position. For example, if
 *     the label position is "above" it would result in "field-label-above".
 *
 * Other variables:
 * - $element['#object']: The entity to which the field is attached.
 * - $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
 * - $element['#field_name']: The field name.
 * - $element['#field_type']: The field type.
 * - $element['#field_language']: The field language.
 * - $element['#field_translatable']: Whether the field is translatable or not.
 * - $element['#label_display']: Position of label display, inline, above, or
 *   hidden.
 * - $field_name_css: The css-compatible field name.
 * - $field_type_css: The css-compatible field type.
 * - $classes_array: Array of html class attribute values. It is flattened
 *   into a string within the variable $classes.
 *
 * @see template_preprocess_field()
 * @see theme_field()
 *
 * @ingroup themeable
 */
?&gt;
&lt;!--
THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
See http://api.drupal.org/api/function/theme_field/7 for details.
After copying this file to your theme's folder and customizing it, remove this
HTML comment.
--&gt;
&lt;div class="&lt;?php print $classes; ?&gt;"&lt;?php print $attributes; ?&gt;&gt;
  &lt;?php if (!$label_hidden): ?&gt;
    &lt;div class="field-label"&lt;?php print $title_attributes; ?&gt;&gt;&lt;?php print $label ?&gt;:&amp;nbsp;&lt;/div&gt;
  &lt;?php endif; ?&gt;
  &lt;div class="field-items"&lt;?php print $content_attributes; ?&gt;&gt;
&lt;?php $i = 0; ?&gt;        
&lt;?php foreach ($items as $delta =&gt; $item): ?&gt;
&lt;?php $i++; ?&gt;
      &lt;div class="field-item &lt;?php print $delta % 2 ? 'odd' : 'even'; ?&gt; custom-class-&lt;?php print $i;?&gt;"&lt;?php print $item_attributes[$delta]; ?&gt;&gt;&lt;?php print render($item); ?&gt;&lt;/div&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/div&gt;
&lt;/div&gt;


For more info check field.tpl.php

To override node.tpl.php check

You can also check this link https://api.drupal.org/api/drupal/includes%21theme.inc/function/template_preprocess/7