diff --git a/views_xml.module b/views_xml.module
index 1debb2d..c5a1184 100644
--- a/views_xml.module
+++ b/views_xml.module
@@ -135,19 +135,22 @@ function _views_xml_render_fields($view, $row) {
 
     $img_match = array();
     $src_match = array();
-    if (is_array($field_output)) {
-      foreach ($field_output as $i => $f) {
-        if (preg_match("/<img[^>]+>/i", $f, $img_match)) {
-          if (preg_match('/(src)="([^"]*)"/i', $img_match[0], $src_match)) {
-            $field_output[$i] = ($src_match[2]);
+    if (isset($field->options['type'])){
+      if (is_array($field_output) && $field->options['type'] == 'image') {
+        foreach ($field_output as $i => $f) {
+          if (preg_match("/<img[^>]+>/i", $f, $img_match)) {
+            if (preg_match('/(src)="([^"]*)"/i', $img_match[0], $src_match)) {
+              $field_output = ($src_match[2]);
+            }
           }
         }
       }
-    }
-    else {
-      if (preg_match("/<img[^>]+>/i", $field_output, $img_match)) {
-        if (preg_match('/(src)="([^"]*)"/i', $img_match[0], $src_match)) {
-          $field_output = ($src_match[2]);
+      else if ($field->options['type'] == 'image' ) {
+        // if field's type was an image. we just ge the path.
+        if (preg_match("/<img[^>]+>/i", $field_output, $img_match)) {
+          if (preg_match('/(src)="([^"]*)"/i', $img_match[0], $src_match)) {
+            $field_output = ($src_match[2]);
+          }
         }
       }
     }
