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

Attachment Link Rules

Viggo MeestersViggo Meesters43 downloads

Choose link or embed syntax for dropped attachments by file extension.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

Attachment Link Rules hero

Choose whether dropped attachments become normal links or embeds based on their file extension.

A PDF can land as [[report.pdf]] while an image still lands as ![[diagram.png]]. Native attachment storage, filenames, destinations, and the user's Wiki link or Markdown link preference remain intact.

Highlights

  • PDF and office files default to normal links without !.
  • Images, audio, and video default to embeds with !.
  • Configure extension lists in the settings screen.
  • Unlisted extensions retain the syntax generated by the app.
  • Works with external file drops and native vault-file drops because storage stays native.
  • Uses public APIs only and does not modify existing notes or attachments.

Settings preview

Default rules

Normal links: pdf doc docx xls xlsx ppt pptx zip 7z rar

Embeds: png jpg jpeg gif webp svg avif bmp mp3 wav m4a ogg flac mp4 webm mov

If an extension appears in both lists, the normal-link rule wins. Extensions are case-insensitive and may be separated by spaces or commas.

How it works

The app performs its normal drop operation first, including choosing the attachment folder, resolving duplicate filenames, and generating Wiki or Markdown link syntax. The plugin then inspects only the newly inserted text and adds or removes the leading ! according to the configured extension rules.

This avoids private editor internals and avoids reimplementing attachment storage.

Installation

Install from the Community directory when available, or copy the three signed release artifacts for a manual test-vault installation. No package manager or external service is required at runtime.

Community plugins

After the plugin is accepted into the Community directory:

  1. Open Settings → Community plugins → Browse.
  2. Search for Attachment Link Rules.
  3. Install and enable it.

Manual installation

Copy these release assets into .obsidian/plugins/attachment-link-rules/ inside a test vault first:

  • main.js
  • manifest.json
  • styles.css

Restart the app or reload community plugins, then enable Attachment Link Rules.

Usage

Drag an attachment into an open Markdown note as usual. The app stores the file and inserts its normal link. The plugin then applies the configured rule to the newly inserted syntax:

  • dropping report.pdf produces [[report.pdf]] with the default settings;
  • dropping diagram.png produces ![[diagram.png]];
  • dropping an unlisted extension keeps the native result.

The same rule engine supports Wiki links and Markdown links. Existing links elsewhere in the note are left untouched.

Configuration

Open Settings → Attachment Link Rules:

On Obsidian 1.13 and later, these options are also indexed by the built-in settings search. Older supported versions continue to use the same settings through the legacy-compatible interface.

  • Link extensions removes the leading !.
  • Embed extensions ensures the leading ! is present.
  • Unlisted extensions keep native behavior.
  • Restore defaults resets the two lists.

Development and verification

npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run community:check
npm run sync:test-vault
npm run smoke:test-vault

npm run check runs the complete local source and Community preflight. GitHub Actions are intentionally not required; the repository's deterministic gate is documented in Local validation. Current Community scorecard findings and their disposition are recorded in Community scorecard notes.

The test-vault sync refuses paths outside the Windows-local obsidian-test-vault plugin folder and refuses the main Syncthing vault.

Privacy and security

The plugin performs no network requests, collects no telemetry, and does not read attachment contents. Live network access exists only in the development-time Community uniqueness checker.

See SECURITY.md for reporting guidance.

Release

The release tag must equal manifest.json.version. Each release contains exactly:

  • main.js
  • manifest.json
  • styles.css

See community submission notes and CHANGELOG.md.

License

MIT © 2026 Viggo Meesters.

HealthExcellent
ReviewPassed
About
Choose whether dropped attachments become normal links or embeds based on file extension. Preserve native attachment storage, filenames, destinations and Wiki/Markdown link style while adjusting only the inserted link syntax; set extension lists to treat PDFs/office files as links and images/audio/video as embeds.
AttachmentsLinks
Details
Current version
0.1.1
Last updated
3 weeks ago
Created
4 weeks ago
Updates
2 releases
Downloads
43
Compatible with
Obsidian 1.5.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Viggo MeestersViggo Meestersviggomeesters
GitHubviggomeesters
  1. Community
  2. Plugins
  3. Attachments
  4. Attachment Link Rules

Related plugins

Consistent Attachments and Links

Move note attachments and update links automatically.

Custom Attachment Location

Customize attachment location with variables($filename, $data, etc) like Typora.

Better Paste

Removes tracking from links, fetches page titles, and cleans up pasted text from AI chats, terminals and PDF documents.

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Advanced URI

Control everything with URI.

Breadcrumbs

Visualise the hierarchy of your vault using a breadcrumb trail or matrix view.

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.

Supercharged Links

Add attributes to internal links with the values of target note's frontmatter attributes.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.