omni-compress - v2.3.1
    Preparing search index...

    Function getMimeType

    • Maps a media type + format string to the canonical MIME type string. Handles special cases: jpgimage/jpeg, opusaudio/ogg.

      Parameters

      • type: "image" | "audio" | "video"

        The media category: 'image', 'audio', or 'video'.

      • format: string

        The target format (e.g. 'webp', 'opus', 'mp4').

      Returns string

      The MIME type string (e.g. 'image/webp', 'audio/ogg').