README file from
GithubConsistent Attachments and Links
Obsidian resolves links with a clever search that only Obsidian has, so a vault can be perfectly navigable inside it and full of dead links the moment you open a note anywhere else — in another editor, published to GitHub, or exported as a folder.
This plugin makes that visible. It does two things:
- Check vault consistency audits the whole vault and writes a report, changing nothing: bad links, bad embeds and bad frontmatter links (every link whose written path does not itself lead to its target), attachments sitting outside their note's attachment folder, and names and paths a platform you sync to would reject.
- Fix incompatible paths repairs those names and paths — not because Obsidian cannot open them, but because that platform's filesystem cannot store them. Links follow the rename, and the original name is kept.
It never rewrites a link into a style, moves an attachment or cleans up folders: where those matter, it reports and leaves the change to you.
[!IMPORTANT]
This plugin requires Advanced Rename and Delete Handler, which since 4.0.0 handles renames and deletions for the whole vault — keeping attachments traveling with their note and links rewritten when you move, rename or delete one — so several plugins can no longer fight over it. This plugin loads nothing until that plugin is installed, explains why, and installs it in one click — which changes nothing on its own, since its defaults do nothing until you turn renames or deletions on. It then offers to hand your old settings across.
[!NOTE]
Upgrading from an older version? Link conversion, link-path rewriting, attachment collecting,
Delete empty foldersandReorganize vaulthave moved to other plugins or been retired. Where the old features went maps each one to the plugin that owns it now.
[!WARNING]
Fix incompatible paths renames files and folders across the whole vault, so it is crucial that you back up your vault before running it!
Demo vault
The documentation is a demo vault. Every feature has a note that explains what it does and why you would want it, with example notes to run it against.
Start reading here — it is plain markdown, so it works on GitHub with nothing installed.
A copy of the vault ships with every release. You can access it via any of the following:
- Running the Consistent Attachments and Links: Open demo vault command.
- Downloading
consistent-attachments-and-links-demo-vault.zipfrom the Releases. It unzips into a singleconsistent-attachments-and-links-demo-vault-<version>folder. - Browsing its source in
demo-vault/in this repository.
What it does
- Audit the whole vault and get a report of bad links, bad embed paths, bad frontmatter links, attachments sitting outside their configured attachment folder and names a platform you sync to would reject, changing nothing. 03 Check vault consistency
- Keep paths valid on every platform you sync to — find and bulk-repair the names and paths that Windows, Android, Linux, macOS or iOS would reject, without breaking a single link. 08 Keep paths valid on every platform
- Every command, and where the ones that left went. 07 Commands
- Settings, including which platforms the path repair enforces. 05 Settings
- Obsidian's own settings matter too — link format, attachment location — and the vault explains which ones to change and why. 06 Recommended Obsidian settings
Where the old features went
This plugin has been cut down over time to reporting and path repair. Each feature it used to have now has a single owner, so two plugins no longer carry copies of the same feature. The changelog says which release moved each one.
| What you used | Where it lives now | What to do |
|---|---|---|
| Rewriting links and moving attachments on rename, move and delete (until 4.0.0) | Advanced Rename and Delete Handler | Nothing to install: this plugin requires it. Turn on its rename and delete handling; this plugin offers your old settings to it. |
Delete empty folders, automatic and manual |
Advanced Rename and Delete Handler | The automatic half is its Empty folder behavior setting. The manual command kept its name and id there, so an existing hotkey keeps working. |
The four Replace all wiki… commands |
Better Markdown Links | It converts one file, one folder or the whole vault, and can convert as you type. The report no longer treats a wikilink as a defect. |
The four Convert all … paths to relative commands |
Better Markdown Links | It owns link paths as well as link style. The report still lists a path that does not resolve. |
| Collect attachments, Move attachment to proper folder and collecting as you edit (until 5.0.0) | Custom Attachment Location | Optional: this plugin suggests it, and the first time both are installed it offers your old collect settings, showing what would change and writing nothing unless you approve. This plugin still reports a misplaced attachment. |
Reorganize vault |
Retired | Every step but the last moved to the plugins above, so run Fix incompatible paths — it does exactly what Reorganize vault still did. |
The Attachment Subfolder setting (until 3.0.0) |
Custom Attachment Location | It chooses the folder each new attachment goes into, per note or per anything a pattern can express, and it is what this plugin's report checks attachments against. Without it, this plugin follows Obsidian's built-in Default location for new attachments. See 06 Recommended Obsidian settings. |
Every command, and the full story of each one that left, is in 07 Commands.
Installation
The plugin is available in the official Community Plugins repository.
Beta versions
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
- Ensure you have the BRAT plugin installed and enabled.
- Click Install via BRAT.
- An Obsidian pop-up window should appear. In the window, click the
Add pluginbutton once and wait a few seconds for the plugin to install.
Debugging
By default, debug messages for this plugin are hidden.
To show them, run the following command in the DevTools Console:
window.DEBUG.enable('consistent-attachments-and-links');
For more details, refer to the documentation.
Changelog
All notable changes to this project will be documented in the CHANGELOG.
Contributing
Contributions are welcome — see CONTRIBUTING to get set up.
Support
My other Obsidian resources
See my other Obsidian resources.
License
© dy-sh
Maintainer: Michael Naumov