public static function getImageSize($name)
    {
        if (isset($_FILES[$name])) {
            $tempFile = $_FILES[$name]['tmp_name'];
            if (!empty($tempFile) && file_exists($tempFile)) {
                $size = getimagesize($tempFile);

                return $size;
            }
        }

        return getimagesize($name);
    }