function detectImageType
detectImageType(data: Uint8Array): string | null

Detect the actual image type from magic bytes. Returns the MIME type if matched, null otherwise.

Parameters

Return Type

string | null

Usage

import { detectImageType } from "docs/embed.ts";