Hiding an image field based on theme in Drupal 7 I want to hide an image field(field_image) of a node when a different theme is selected.

How can I do it?

I'm not able to find any sample code in internet but I know it can be done both in tpl.php and template.php files.
It can be done in node.tpl.php

hide($content['field_image']);


or in hook_preprocess_node

hide($variables['content']['field_image']);


It works with views as well if you are using content row plugin.
For fields you have to override views-view-fields.tpl.php and remove image field from $fields variable.

unset($fields['field_image']);


Also take look at this modules:

https://drupal.org/project/cs_adaptive_image

https://drupal.org/project/adaptive_image