code: public static function isImage($file)
      {
          try {
              $level = error_reporting(E_ERROR | E_PARSE);
              $isImage = self::isFile($file) && getimagesize($file) !== false;
              error_reporting($level);
  
              return $isImage;
          } catch (Exception $e) {
              return false;
          }
      }
docs: Determine the given file has a image type
  
  @param  mixed  $file
  
  @return boolean