Showing icons to represent content types Is there a simple way to have the site display a content type icon just before the "Submitted by..." function? I know I can do this conditionally in node.tpl.php like 

if ($type==blog_post) echo '&lt;img src=blog_post.png /&gt;';


etc. But this seems cumbersome. I have seen this done as part of Drupal Commons and others. Is there a module that can handle this or any other systematic changes to how the metadata is displayed?
This is set up by the node.module via preprocess()ing in variables:

// Display post information only on certain node types.
if (variable_get('node_submitted_' . $node-&gt;type, TRUE)) {
  $variables['display_submitted'] = TRUE;
  $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' =&gt; $variables['name'], '!datetime' =&gt; $variables['date']));
  $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' =&gt; $node)) : '';
}
else {
  $variables['display_submitted'] = FALSE;
  $variables['submitted'] = '';
  $variables['user_picture'] = '';
}


These are then used like this in (the standard core) node.tpl.php:

&lt;?php if ($display_submitted): ?&gt;
  &lt;div class="submitted"&gt;
    &lt;?php print $submitted; ?&gt;
  &lt;/div&gt;
&lt;?php endif; ?&gt;


So, it would be pretty easy to do something along these lines in your theme's template.php file:

function YOURTHEME_preprocess_node(&amp;$variables) {

  if ($variables['display_submitted']) {
    $variables['submitted']='&lt;img class="submitted-node-type" src="' . $variables['node']-&gt;type . '.jpg"&gt;' . $variables['submitted']; // or whatever/however you want to do this
  }

  // any other preprocessing goes here

}