exiftool-vendored
    Preparing search index...

    Class TagDescriptions

    Provides access to human-readable descriptions for ExifTool metadata tags.

    Descriptions are sourced from ExifTool's built-in tag database (via -listx) and merged with hand-curated descriptions for important tags.

    CAUTION: The first call to an async method (e.g., getAsync(), preload(), getAll()) may take several seconds as it launches ExifTool to retrieve tag information.

    SECOND CAUTION: The in-memory cache can consume significant memory (several MB).

    THIRD CAUTION: The on-disk cache can consume disk space (several MB).

    FOURTH CAUTION: The synchronous get() method only works after descriptions are loaded! Be sure to call preload() during application initialization for sync access later.

    FIFTH CAUTION: Tag descriptions may vary between ExifTool versions and languages.

    import { exiftool } from "exiftool-vendored";

    const descriptions = new TagDescriptions(exiftool);

    // Preload during app initialization for sync access later
    await descriptions.preload();

    // Sync lookup (instant if preloaded)
    const desc = descriptions.get("DateTimeOriginal");
    // => { desc: "When a photo was taken...", see: "https://..." }

    // Or use async lookup (auto-loads if needed)
    const desc2 = await descriptions.getAsync("ISO");
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get size(): number

      Get the number of tag descriptions available. Returns 0 if not yet loaded.

      Returns number

    Methods

    • Clear the in-memory cache. The disk cache is preserved; call preload() to reload from disk.

      Returns void

    • Synchronous lookup of a tag description. Returns undefined if descriptions haven't been loaded or tag is unknown.

      For guaranteed results, call preload() first or use getAsync().

      Parameters

      • tagName: string

        The tag name (e.g., "DateTimeOriginal", "ISO")

      Returns TagDescription | undefined

      Tag description or undefined

    • Get all loaded tag descriptions. Automatically loads descriptions if not yet loaded.

      Returns Promise<ReadonlyMap<string, TagDescription>>

      Promise resolving to a readonly Map of tag names to descriptions

    • Asynchronous lookup of a tag description. Automatically loads descriptions if not yet loaded.

      Parameters

      • tagName: string

        The tag name (e.g., "DateTimeOriginal", "ISO")

      Returns Promise<TagDescription | undefined>

      Promise resolving to tag description or undefined

    • Preload all tag descriptions into memory. Call this during application initialization for instant sync access later.

      Returns Promise<void>

      Promise that resolves when descriptions are loaded