Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Archive Redirect

semsevenssemsevens2k downloads

Archive remote URLs from markdown locally and serve from local cache on render.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates11

Archive Redirect is now part of Media One, as its Web image archive module. Install Media One (formerly Media Transcript) from the community plugins, disable Archive Redirect, and reload Media One: it takes over your Archive Redirect settings. This plugin gets no further updates.

Archive remote URLs referenced in your markdown to a local cache, and transparently serve the cache when the note is rendered. Defends your vault against link rot without rewriting any markdown.

The problem

Notes that quote articles, tweets, or research often embed remote images, video, or audio:

![](https://mmbiz.qpic.cn/.../abc.jpg)
![](https://pbs.twimg.com/media/XYZ.png?name=orig)

When the original host disappears (the WeChat account is deleted, the tweet is removed, the CDN expires the URL), every embed in your vault silently breaks. The note still reads, but the visual context is gone.

What this plugin does

For every remote <img>, <video>, <audio> it encounters:

  1. Archives the file under a content-addressed path (SHA1 of the URL). Two storage modes are supported:
    • Sibling (default): <mdDir>/_archive/<sha1>.<ext> — one folder per markdown's directory, notes stay self-contained.
    • Central: <centralPath>/<bucket>/<sha1>.<ext> — a single shared folder, bucketed by the first 2 hex chars of the SHA1 (256 buckets). True global dedup; cache survives moving the markdown. The folder can be vault-relative or an absolute path outside the vault (e.g. ~/Media/_archive).
  2. Redirects the rendered element's src to an archived copy at display time — in both Reading mode and Live Preview. Copies come from an ordered list of sources: the local archive, plus any number of your own WebDAV servers (same <bucket>/<sha1>.<ext> layout). A copy that fails to load hands over to the next, and the remote URL is the last resort.
  3. Shares the archive through your servers. A new download is saved locally and uploaded to every server; a server that can't be reached gets it once it's back. A file another device already put on a server is copied from there instead of the original URL — so every device ends up with the same archive.
  4. Works on mobile too. On a phone or tablet the servers are the archive: copies are read from them, and new downloads are uploaded straight to them (a local folder outside the vault exists only on desktop; one inside the vault works everywhere).
  5. Leaves the markdown file untouched. The URL in your .md never changes. If you later view the file outside Obsidian, share it, or this plugin is uninstalled, the remote URL still works as a fallback.

The archive is content-addressed by URL hash, so the same URL appearing in multiple notes is stored once (sibling mode dedups per folder; central mode dedups across the whole vault).

How it works

┌──────────────────────────┐
│  ![](https://remote.url) │   ← markdown stays as-is
└──────────┬───────────────┘
           │
           ▼
   ┌──────────────────────────────────────┐
   │  Scanner extracts URLs               │
   │  Policy decides which to archive     │   ← domain rules + media extension
   │  Downloader fetches with retry       │
   │  File saved at _archive/<sha1>.<ext> │
   └──────────────────────────────────────┘
           │
           ▼
   ┌──────────────────────────────────────┐
   │  At render time:                     │
   │  resolve(url) → server / local copy  │   ← Reading + Live Preview
   │  try them in Load order, then remote │
   └──────────────────────────────────────┘

Triggers

The plugin archives in three ways:

  • On file modify: when you edit a markdown file, new remote URLs in it are queued for download.
  • Manual scan: command Scan vault & archive remote resources walks every markdown file in scope.
  • No render-time downloads. Display only swaps to local if the archive already exists.

Settings

Setting Default Purpose
Archive mode Sibling Sibling = per-note folder; Central = one shared vault-relative folder with hash bucketing.
Archive directory name (sibling) _archive Subfolder name (sibling to each .md) that holds cached files.
Central archive path (central) _archive Folder that holds all cached files, bucketed by hash prefix: vault-relative, or an absolute / ~/ path outside the vault. Migrate and reconcile work only inside the vault.
Sources Local archive Ordered list of where copies are read from: the local archive and WebDAV servers (e.g. https://host.ts.net/dav/archive, readable and writable). Each server is checked once, then every 5 min (30 s while unreachable); one that's down is skipped. The local archive always stays in the list.
Waiting to upload — Shown when files couldn't reach a server yet; they're retried when it answers and every 10 min, or with Upload now.
Auto-archive on file modify on If off, only the manual scan command triggers downloads.
Included paths (empty = whole vault) Newline-separated vault paths to operate on. Example: raw/wechat.

Domain policies

Built-in rules in policies.ts:

Domain Action Notes
mmbiz.qpic.cn, res.wx.qq.com, mmbiz.qlogo.cn archive WeChat — requires Referer: https://mp.weixin.qq.com/
pbs.twimg.com archive Twitter / X images
video.twimg.com skip Twitter videos are large and the CDN is long-term stable
youtube.com, youtu.be, vimeo.com skip stream-only
(anything else) archive only if URL has a media extension (.jpg/.png/.mp4/…) prevents accidentally fetching HTML page URLs

Failure handling

  • 3 attempts with [0, 1s, 3s] backoff.
  • 15 second timeout per request.
  • http:// URLs are automatically upgraded to https:// (Obsidian's requestUrl does not accept cleartext HTTP).
  • Permanent statuses (400 / 401 / 403 / 404 / 410 / 451) skip retry.
  • Failed downloads append a JSONL entry to <archive>/.failed.jsonl with URL, error, and timestamp.

Installation

Via BRAT (current)

While awaiting Community Plugins approval:

  1. Install the BRAT plugin.
  2. Command palette → BRAT: Add a beta plugin for testing.
  3. Enter semsevens/obsidian-archive-redirect.
  4. Enable Archive Redirect in Community plugins.

Manual

Download main.js and manifest.json from the latest release into <vault>/.obsidian/plugins/archive-redirect/, then enable.

⚠️ Do NOT combine with attachment-cleanup plugins

Archive Redirect never modifies your markdown. The URL in your .md stays remote; the local cache is swapped in only at render time, via the rendered <img> / <video> / <audio> element's src attribute.

This means third-party "remove orphaned attachments" plugins cannot see that the local cache is in use — they scan for markdown ![]() or [[wikilink]] references, not HTML src attributes. They will flag every file in _archive/ as orphaned and may delete the entire folder, including content whose source URLs are already dead and unrecoverable.

Known dangerous combinations (verified via GitHub issues — 450-image vault wipes have happened in the wild):

  • oz-clear-unused-images — repeated reports of mass deletion of HTML-referenced images.
  • Local Images Plus "Remove orphaned attachments" / "(Plugin folder)" commands.
  • Any "garbage-collect unused attachments" tool.

Mitigations Archive Redirect ships with:

  • A marker file .archive-redirect-managed is written into every archive folder with a warning. Some cleanup plugins respect such markers; most do not.
  • This warning, prominently in the README.

Your responsibility: either uninstall the cleanup tool while Archive Redirect is active, or configure it to exclude your archive folder.

Multi-device & sync

The plugin is designed to behave well across multiple devices that share the same vault via iCloud Drive / Obsidian Sync / Dropbox / Syncthing. URLs are hashed to deterministic paths, settings live in <vault>/.obsidian/plugins/archive-redirect/data.json (which syncs), and the local cache itself is stored inside the vault — so a file fetched on one device naturally appears on all of them after sync.

That said, real-world sync introduces a handful of caveats worth knowing:

Caveats

  • iCloud Drive "Optimize Mac Storage": by default, iCloud may keep only file metadata locally and download the bytes on first access. The plugin checks vault.adapter.exists(path) which sees the metadata and treats the file as present — but the rendered <img> then shows a brief blank while iCloud streams the actual bytes in. Mitigation: in the Finder, right-click _archive/ → Download Now, or disable "Optimize Mac Storage" entirely.
  • Concurrent migration on two devices is the most dangerous case. If you run Migrate sibling archives to central on two devices at the same time, iCloud will reconcile by creating .icloud-conflict-* siblings. No data is lost, but you get a mess to clean up. Run migration on one device, wait for sync to finish, then verify on the other.
  • Plugin version skew: if device A is on v0.5.0+ and uses central mode while device B is still on v0.4.x, B's resolver still looks for files in sibling _archive/ folders that A has emptied. B's notes will silently fall back to remote URLs and stay slower. Update Archive Redirect on every device before switching to central mode.
  • Settings drift before sync settles: if you change centralArchivePath on one device and immediately start using the new path on another (before data.json has propagated), the two devices will write to different folders. The new Reconcile stale central archive folders command (v0.5.1+) detects this by scanning for the .archive-redirect-managed marker file outside the current central path and offers to merge.
  • Same-URL race during sync delay: device A finishes a download just as device B opens the same note. B may not yet see A's file (sync still propagating) and will re-fetch. No data problem — just duplicate network traffic. The plugin is fully idempotent: same URL → same hash → same byte content, so a duplicate write produces a binary-equal file.

Recommended setup

  1. Install and enable Archive Redirect on every device before switching any device to central mode.
  2. Run Migrate sibling archives to central on one device only. Wait for sync to settle (watch the iCloud icon in the menu bar) before touching the other devices.
  3. If you use iCloud Drive and want fully offline access to cached media, set _archive/ (or your central path) to Always Keep Downloaded in Finder.
  4. If you ever see two folders both containing .archive-redirect-managed, run Reconcile stale central archive folders from the command palette — it will move the orphan into the current central path.

Limitations

  • Desktop only. Uses Node's crypto module; mobile support requires swapping to Web Crypto (which is async) and is planned for a later release.
  • No Live Preview widget replacement. The plugin mutates src after Obsidian renders the element. It does not interfere with other plugins (e.g. auto-embed) that work on page URLs.
  • Large files block the main thread. The current downloader is synchronous from Obsidian's perspective. Acceptable for thousands of images; not yet tuned for large video archives.

License

MIT

HealthExcellent
ReviewCaution
About
Archive remote images, video, and audio referenced in Markdown to a local content-addressed cache and serve the cached files when notes render in Reading and Live Preview. Keep the original Markdown unchanged, dedupe identical URLs by hash, and fall back to the remote URL if the local copy is missing.
AttachmentsImagesVideo
Details
Current version
0.8.0
Last updated
4 weeks ago
Created
6 months ago
Updates
11 releases
Downloads
2k
Compatible with
Obsidian 1.4.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
semsevenssemsevenssemsevens
GitHubsemsevens
  1. Community
  2. Plugins
  3. Attachments
  4. Archive Redirect

Related plugins

Ink

Handwriting and drawing directly between paragraphs using a digital pen, stylus, or Apple pencil.

Paste image rename

Rename image after pasting, support name pattern and auto renaming.

Imagine

A comprehensive image management plugin for managing, inserting, resizing, viewing, and batch processing images.

Pixel Perfect Image

Pixel perfect 100% image resizing, copy to clipboard, show image in Finder/Explorer, and much more.

Pixel Banner

Enhance your notes with customizable banner images.

Image auto upload

Upload images from your clipboard by PicGo.

Supernote (Unofficial)

Sync and view Supernote notes and Atelier drawings in your vault

Image Context Menus

Image context menus (mostly on right click): Copy to clipboard, Open in default app, Show in system explorer, Reveal file in navigation, Open in new tab.

S3 Image Uploader

Self-host images on AWS S3.

Share Note

Instantly share/publish a note, with the full theme and content exactly like you see in Obsidian. Data is shared encrypted by default, and only you and the person you send it to have the key.