My WordPress Blog consists of the following snippet:
<?php
$images = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');
if (count($images) > 0) { ?>
<div class="image-holder">
<a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_directory') ?>/javascript/timthumb.php?src=<?php echo $images[0]; ?>&h=320&w=630&zc=1" alt="<?php the_title();?>" /></a>
</div>
<?php }
?>
This displays a title image (featured image) on top of the actual content and uses timthumbb to resize it. All is fine here, however it shows a broken img src if there is no defined featured image. Is there a way to edit this in order to only display the image if there is actually one present?