check image exists in that location code example
Example 1: check image is available on server php
if (file_exists('http://www.mydomain.com/images/'.$filename)) {
… }
Example 2: php if no imagee exists
<?php
$image_path_filename = '/path/images/donate.jpg';
if (file_exists($image_path_filename)) {
echo "The file $image_path_filename exists";
} else {
echo "The file $image_path_filename does not exist";
}
?>