title: Is there any way to have PHP detect a corrupted image?
body: <p>Is there any way to have PHP determine whether an image file is corrupted and will not be able to display properly? </p>
  
  <p>I've tried to check with <code>fopen</code> and check whether the URL is valid, but it hasn't worked!</p>