Expand description
Markdown image localization module (R5).
Post-processing tool that:
- Reads markdown text
- Extracts all external image URLs
- Downloads images to local directory
- Updates markdown to reference local paths
Based on reference implementation from: https://github.com/link-foundation/meta-theory/blob/main/scripts/download-markdown-images.mjs
Structs§
- Image
Metadata - Metadata about a localized image.
- Image
Reference - An image reference extracted from markdown.
- Image
Replacement - A replacement to apply to markdown text.
- Localize
Options - Options for localizing images.
- Localize
Result - Result of localizing images.
Functions§
- extract_
image_ references - Extract image references from markdown text.
- generate_
local_ filename - Generate local filename for a downloaded image.
- get_
extension_ from_ url - Get file extension from URL.
- localize_
images - Localize images in markdown text by downloading external images and replacing URLs with local paths.