private static function getDestinationQuality(?string $imgExtension = null): int
    {
        switch ($imgExtension) {
            case 'png':
                $quality = static::$qualityPNG;
                break;
            default:
                $quality = static::$quality;
                break;
        }
        return $quality;
    }