Zero-dependency Python tool resolves relative links and inlines images as base64 for multimodal LLMs

Mediocre-Ease4060 · reddit · 2026-08-26

The author open-sourced markdown-link-resolver, a pure-Python micro-tool addressing two RAG scraping pain points: relative links like here break, and passing scraped images to GPT-4o or Claude 3.5 requires manually downloading and base64-encoding them. The tool 1) resolves all relative Markdown/HTML links to absolute URLs, and 2) with inlineimages=True, automatically fetches HTTP images and replaces their markdown tags with data:image/png;base64,... strings ready for LLM ingestion. Notably it has zero heavy dependencies — only the standard library (urllib, re, base64), no BeautifulSoup or Requests — and falls back gracefully on 404s. Repo: github.com/Encephos/markdown-link-resolver.

Original post →

More from coding & agent

coding & agent channel →