private static function getSourceFunction(?int $imgType = null): ?string
    {
        switch ($imgType) {
            case IMAGETYPE_JPEG:
                $src['function'] = 'imagecreatefromjpeg';
                break;
            case IMAGETYPE_PNG:
                $src['function'] = 'imagecreatefrompng';
                break;
            case IMAGETYPE_GIF:
                $src['function'] = 'imagecreatefromgif';
                break;
            default:
                $src['function'] = null;
                break;
        }
        return $src['function'];
    }