Look at your install
I have changed getimagesize to @getimagedsize to prevent error display but your images looks corrupted
http://www.7thgencivic.com/parts_rev.../cat/19/page/1
We only run getimagesize in the first place if the image exists. My only correction would be to add and I have done so the code in bold
if ( file_exists($checklink) ) {
$image_stats =
@getimagesize( $checklink );
$width = $image_stats[0];
$height = $image_stats[1];
}