(Views) How to style an image field conditionally based on term
Method 1. Use a node preprocessor
Add this to your theme's template.php, then clear the cache:

function THEMENAME_preprocess_node(&amp;$variables) {
  
  // This only applies to content type 'article' in teaser view.
  if ($variables['node']-&gt;type == 'article' &amp;&amp; $variables['view_mode'] == 'teaser') {
     
     // Find out if node has at least one tag and an image.
     if (isset($variables['content']['field_tags']) &amp;&amp; isset($variables['content']['field_image'])) {
      
      // Map tags to style names.
      $settings = array(
        'apple' =&gt; 'medium', 
        'banana' =&gt; 'large',
      );
      
      // Build an array of tag names.
      $tags = array();
      foreach ($variables['content']['field_tags'] as $k =&gt; $v) {
        if (is_int($k)) {
          $tags[] = $v['#title'];
        }
      }
      
      // For each mapping, check if the tag exists in the $tags array; 
      // if yes, apply the style.
      foreach ($settings as $tag =&gt; $style_name) {
        if (in_array($tag, $tags)) {
          $variables['content']['field_image'][0]['#image_style'] = $style_name;
        }
      }
    }
  }
}

Note that we could also do something similar in node--article.tpl.php, but generally you want to keep code logic out of the template files.

Method 2. Use Rules and Field formatter conditions modules (no coding required!)
The example below will set the image style of field_image to 'thumbnail' in the node's teaser view if field_tags contains a term with an ID of 18.
The Field formatter conditions module an image style to be conditionally set based on the outcome of a rule. It involves creating a rule, then going to Structure &gt; Content types &gt; [content type] &gt; Manage display and adding the condition in the configuration options of your display (in this case the &quot;Teaser&quot; display).
Note: This example only checks for a single term. To compare against more terms, add more &quot;List contains item&quot; conditions, one for each term.
Here is the rule:

Here are the formatter settings: