Home >> Snippet List >> Snippet

Name
Check if an image exists (GD)
Description
Check if an image exists using the GD library
PHP Snippet
<?PHP 
 
//check if image exists 
IF($img = @GETIMAGESIZE("testimage.gif")){ 
     ECHO "image exists"; 
}ELSE{ 
     ECHO "image does not exist"; 
} 
 
?>