PHP- check if image exists php

Question: How can we check if image exists with php code?

Answer: Below is the code to check if image exists or not.

if (getimagesize($user_profilr_pic_url) !== false) {
  echo 'Image Exist';
}else{
  echo 'Image Does Not Exist';
}

No comments:

Post a Comment