private static function getDestinationFunction(string $imgExtension = null): ?string
    {
        switch ($imgExtension) {
            case 'jpg':
            case 'jpeg':
                $dst['function'] = 'imagejpeg';
                break;
            case 'png':
                $dst['function'] = 'imagepng';
                break;
            case 'gif':
                $dst['function'] = 'imagegif';
                break;
            default:
                $dst['function'] = null;
                break;
        }
        return $dst['function'];
    }