Add 32×32 icon to custom post type index page

If when using firebug you are seeing

#icon-album.icon32.icon32-posts-album {
  background:url('<?php get_template_directory_uri(); ?>/images/album32x32.png') no-repeat;
}

Then you’re passing the string '<?php get_template_directory_uri(); ?>/images/album32x32.png' to the background property in your css file – and they don’t execute php code.

If the image and CSS are in a theme folder (or at least the CSS file is in some directory above/with the image) then you can use relative urls.

For those who are developing plug-ins for release and do not want to enqueue some CSS file for one simple line…

// Adds icon to the page head
add_action('admin_head', 'wpse74477_plugin_header_image');
function wpse74477_plugin_header_image() {
    $post_type = get_current_screen()->post_type;

    if ( 'album' != $post_type )
        return;
    ?>
         <style type="text/css">
            .icon32.icon32-posts-album {
               background: url(<?php echo get_template_directory_uri(); ?>/images/album32x32.png) !important;
            }
         </style>
     <?php
}