How to check that image exists on remote url

To check image exists on remote url we have to get image size. 


<?php
$image_remote_link = "Your image remote url";
if (@getimagesize($image_remote_link)){
echo "image exists ";
} else {
echo "image does not exist";
}
?>