Search results issue I am using the drupal's built in search module, for this I have copied the search-results.tpl.php in my theme folder. Now I have to add images for search results too and also want to custom theme the template file. For images I have used the following approach:
In my template.php:

function MyTheme_preprocess_search_result(&amp;$variables)
{
if ($result['node']-&gt;type == "content_type") {
 $node = node_load($result['node']-&gt;nid);
 $prod_image = field_view_field('node', $node, 'machine_name_img', $display = array());
 $variables['image'] = $prod_image;
}
}


and then in search-result.tpl.php:

&lt;?php if($prod_image):?&gt;
    &lt;?php print render($prod_image);?&gt;
&lt;?php endif; ?&gt;


but its not working, can anybody knows how do I get the images related to search results, and how can I theme search results?
You're using the wrong var name. In your preprocess function you're using $variables['image'] = $prod_image; to set the var. Whatever element name you use in the the $variables array will be the name of the var in the template. So in your case it should be: 

&lt;?php if($image):?&gt;
    &lt;?php print render($image);?&gt;
&lt;?php endif; ?&gt;