markmv - v1.41.7
    Preparing search index...

    Function extractCommand

    • CLI command handler for extract operations.

      Writes each inline base64 image data URI in the given markdown files out to a real image file and rewrites the markdown to link to it. The image filename derives from the alt text when it yields a usable slug, otherwise a per-file img-1, img-2, ... counter is used; the extension comes from the data URI's mime type.

      Parameters

      • patterns: readonly string[]

        File patterns to process (supports globs)

      • options: Readonly<ExtractOptions>

        Command options

      Returns Promise<void>

      Extract every inline image, writing files next to the markdown, or into a shared asset directory

        markmv extract doc.md
      markmv extract docs/*.md --output-dir assets/

      Will exit the process with code 1 if the operation fails