public static function CanUploadImages() { // Check that we have the necessary tools to allow image uploading // Is the Uploads directory available and correctly permissioned? if (!Gdn_Upload::CanUpload()) { return FALSE; } // Do we have GD? if (!function_exists('gd_info')) { return FALSE; } $GdInfo = gd_info(); // Do we have a good version of GD? $GdVersion = preg_replace('/[a-z ()]+/i', '', $GdInfo['GD Version']); if ($GdVersion < 2) { return FALSE; } return TRUE; }