md-localize-images
md-localize-images scans Markdown files, downloads remote image references, stores them locally, and rewrites the image links.
The tool is intended for Obsidian vaults, but it also works with ordinary Markdown files. The default rewritten link style is Obsidian embed syntax:
![[attachments/image.png]]
Install for development
python -m pip install -e ".[dev]"
Usage
Process one file:
md-localize-images --file path/to/note.md
Process a vault recursively:
md-localize-images --vault path/to/vault --recursive
Choose where downloaded images are stored:
md-localize-images --file note.md --images-dir attachments/imported-images
Use relative Markdown links instead of Obsidian links:
md-localize-images --file note.md --link-style relative
Run without writing files:
md-localize-images --vault . --recursive --dry-run
Create Markdown backups before modification:
md-localize-images --vault . --recursive --backup
Process raw HTML image tags as well as Markdown images:
md-localize-images --vault . --recursive --include-html-img
Exit Codes
0: success1: one or more downloads failed, but processing completed2: invalid command-line arguments3: filesystem or path configuration error
Notes
- WebP images are saved as PNG files.
- Links inside fenced code blocks, indented code blocks, inline code spans, and HTML comments are not modified.
- Existing image files are not overwritten; a deterministic hash is added to avoid collisions.
- Repeated identical URLs are downloaded once per invocation.
- Phase one does not include a persistent cache.
Metadata
Release files for md-localize-images 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| md_localize_images-0.1.0.tar.gz | 21.8 kB | Without provenance | Details for md_localize_images-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| md_localize_images-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for md_localize_images-0.1.0-py3-none-any.whl |
Total release size: 36.9 kB
Release files / md_localize_images-0.1.0.tar.gz
| Download URL | md_localize_images-0.1.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb7f9df60196cb5f90067ae7e89d731146dd89d9b178390411e4b118ed91ce15
|
|
BLAKE2b-256 checksum How to use checksums |
70d71e948ca143a7d1f249967d8d746b71fc592bfaaf28ca02871013842efb7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / md_localize_images-0.1.0-py3-none-any.whl
| Download URL | md_localize_images-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
447cc6af9043b72b2b6b7803a90714168886a9b6335f6534ca04749aaf403065
|
|
BLAKE2b-256 checksum How to use checksums |
47baaaf35b6281687109d1ba4eb2999d7d69dc3ceaf9b85ff02250d39cb55d62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for md-localize-images 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.