it will not hang if you give an else option
here is an example;
if the image exists it resize the image to 1/3 of the original
if the image does not exist it shows another image (if the book cover is not found a general cover is shown)
if (@file_exists("books/".$row["isbn"].".jpg"))
{
$size = GetImageSize("books/".$row["isbn"].".jpg");
if($size[0]>0 && $size[1]>0)
{
$title = "<img src=\"books/".($row["isbn"]).".jpg\" border=1"."width = ". $size[0]/3 ." height = " .$size[1]/3 . ">";
do_html_url($url, $title);
}
}
else
{
echo "<img src=\"books/no_cover1.gif\">";
}