src/includes/classes/Core/Utils/Image.php
public function formatToExt(string $format): string
    {
        switch (($format = mb_strtolower($format))) {
            case 'jpeg':
                $ext = 'jpg';
                break;

            case 'png8':
            case 'png16':
            case 'png24':
            case 'png32':
            case 'png64':
                $ext = 'png';
                break;

            default:
                $ext = $format;
        }
        return $ext;
    }
public function formatToExt(string $format): string
    {
        switch (($format = mb_strtolower($format))) {
            case 'jpeg':
                $ext = 'jpg';
                break;

            case 'png8':
            case 'png16':
            case 'png24':
            case 'png32':
            case 'png64':
                $ext = 'png';
                break;

            default:
                $ext = $format;
        }
        return $ext;
    }
Format to extension.

@since 17xxxx Imagick utils.

@param string $format Image format.

@return string Format extension.