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

Gallery Excluder

calmteacalmtea232 downloads

Prevent Android gallery apps from indexing images stored inside your Obsidian vault using .nomedia files.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

Keep media in your Obsidian vault out of Android gallery apps.

Gallery Excluder creates Android .nomedia files in selected vault folders. Your images remain ordinary files, so they still appear in Obsidian, work in embeds, and can be synchronized normally.

[!NOTE] You can configure the plugin on any platform, but it creates and removes .nomedia files only in Obsidian for Android.

Features

  • Protect the entire vault, the configured attachment folder, or selected custom folders.
  • Apply protection when the vault opens on Android and when a configured folder is created later.
  • Leave any .nomedia file that already exists at a target location untouched.
  • Track the paths it creates so they can be removed when automatic protection is turned off.
  • Show a notice whenever protection files are created or a removal is attempted.

How it works

Android media scanners recognize a file named .nomedia as a request not to index media in that folder or its subfolders. Gallery Excluder places an empty .nomedia file at each location covered by the selected protection mode.

This affects compatible Android gallery and media apps only. It does not delete, move, encrypt, or hide files inside Obsidian.

Installation

Manual installation

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create YourVault/.obsidian/plugins/gallery-excluder/.
  3. Copy the three files into that folder.
  4. Restart Obsidian or reload the app.
  5. Open Settings → Community plugins and enable Gallery Excluder.

Build from source

Building from source generates main.js. The other two required plugin files, manifest.json and styles.css, are already included in the repository.

  1. Install Node.js, which includes npm.

  2. Clone the repository and open its folder:

    git clone https://github.com/Calmtea5209/Gallery-Excluder.git
    cd Gallery-Excluder
    
  3. Install the exact dependencies recorded in package-lock.json, then create a production build:

    npm ci
    npm run build
    
  4. After the build finishes, find the generated main.js in the project root.

  5. Create YourVault/.obsidian/plugins/gallery-excluder/.

  6. Copy main.js, manifest.json, and styles.css into that folder.

  7. Restart Obsidian or reload the app.

  8. Open Settings → Community plugins and enable Gallery Excluder.

The .obsidian folder and .nomedia files are hidden by many file managers. Enable hidden-file display if you need to inspect them.

Usage

Protection is enabled by default for the entire vault. On Android, Gallery Excluder applies the selected mode after the vault is ready. You can change its behavior under Settings → Gallery Excluder.

Setting What it does
Automatic protection Creates and maintains .nomedia files when enabled. Turning it off removes files created by Gallery Excluder.
Protection mode Chooses the folders that Gallery Excluder protects.
Apply protection now Immediately applies the current configuration on Android when protection is enabled.

Protection modes

Mode Protected location
Entire vault The vault root, covering media throughout the vault.
Attachment folder only The attachment folder configured under Obsidian's Files and links settings.
Custom folders One or more vault-relative folders, such as attachments, assets, or images/screenshots. A configured folder can be created later.

If Obsidian stores attachments relative to the current note, such as ./ or ./assets, there is no single vault-wide attachment folder. In Attachment folder only mode, Gallery Excluder asks for a fixed vault-relative fallback folder.

Old images still appear in your gallery

Creating .nomedia stops compatible media scanners from indexing the protected folders, but a gallery app may keep images that it indexed earlier. On Android:

  1. Open Settings → Apps, then select your gallery app.
  2. Tap Force stop.
  3. Open Storage, then tap Clear cache.
  4. Do not tap Clear data; that can reset the gallery app's settings.
  5. Restart the phone, then open the gallery app again.

Menu names may vary between devices and gallery apps. These instructions are also available in a collapsible help card at the bottom of the plugin settings page on Android.

Safety and limitations

  • If .nomedia already exists when Gallery Excluder checks a target, the plugin does not overwrite or track it.
  • Turning automatic protection off deletes .nomedia files at paths recorded as plugin-created. If a different .nomedia file later replaces one at the same path, Gallery Excluder cannot distinguish it and will remove it too.
  • Changing protection modes does not remove files from the previous mode. Turn automatic protection off when you want to clean up all tracked files.
  • Restarting Obsidian does not recreate managed files while automatic protection is off. Turn it on when you want the files created again.
  • Some third-party gallery apps may ignore .nomedia.
  • A .nomedia file may sync to other devices. Windows, macOS, and iOS do not use it for Android media scanning, so it normally has no effect there.
  • Obsidian does not expose a reliable per-file API that lets this plugin exclude .nomedia from Obsidian Sync.
  • Absolute paths and paths containing .. are rejected. Missing or unwritable folders are reported without modifying other locations.
HealthExcellent
ReviewPassed
About
Create .nomedia files in selected vault folders to prevent Android gallery and media apps from indexing your images while keeping files accessible and syncable in Obsidian. Protect the whole vault, attachment folder, or custom folders; leave existing .nomedia files untouched, track created paths for removal, and apply protection when the vault opens or folders are added on Obsidian for Android.
AttachmentsImages
Details
Current version
0.1.3
Last updated
Last month
Created
Last month
Updates
4 releases
Downloads
232
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
calmteacalmtea
GitHubcalmtea5209
  1. Community
  2. Plugins
  3. Attachments
  4. Gallery Excluder

Related plugins

Ink

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

Imagine

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

Local Images Plus

A reincarnation of Local Images to download images in Markdown notes to local storage.

Pixel Perfect Image

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

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.

Paste image rename

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

Image auto upload

Upload images from your clipboard by PicGo.

Awesome Image

One-stop solution for image management and viewing.

Imgur

Upload images from your clipboard to imgur.com and embeds uploaded image to your note.

Supernote (Unofficial)

Sync and view Supernote notes and Atelier drawings in your vault