How to change value a field of preproces I am new to PHP and Drupal. I have content type with a type list text field &quot;Infraestructura&quot;. The values and labels are these:

agua | Agua de pozo
incendios | sistema contra incendios
electricidad |Electricidad

The quantity options is unlimited, is to say, the user can select unlimited options (Checkbox)
How I do to change the output for this field as image?
I need  that output for this field  show an image , example:

for: agua | agua =&gt; &lt;img src =&quot;images/agua.jpg&quot;&gt;
for: incendios | sistema contra incendios  =&gt; &lt;img src =&quot;images/incendios.jpg&quot;&gt;
for: electricidad |Electricidad  =&gt; &lt;img src =&quot;images/electricidad.jpg&quot;&gt;

I'm thinking to do this using preprocess, but I not have idea. Could anyone help me please?
Here is another way to explain what I want to do:
You should preprocess the field output and add a class based on the value. Then to theme in css. It's a good idea to keep the images separate and business logic separate.

&lt;?php

/**
 * Implements template_preprocess_field().
 */
function acTheme_preprocess_field(&amp;$vars) {
  $element = &amp;$vars['element'];
  if ($element['#field_infraestructura'] == 'field_infraestructura') {
    $value = $vars['element']['#items'][0]['value'];
    $vars['classes_array'][] = 'type-' . drupal_clean_css_identifier($value);
  }
}

?&gt;


Take this qwith a grain of salt - I don't see the actual code and values in my debugger, but if you replace myfield_name with the name of the field, and mytheme with the theme name (all these machine names), then it should assign the classes based on the values. 

Sadly, there may be some need of tweaking this code if some mapping does not fit - so, I hope you know at least some PHP to do that.

The output classes should be somehting like class="type-agua", and then you can theme it. You need to know css, of course - there are samples in the comments under your question.