An Obsidian plugin that toggles attachment files between public and private states by adding or removing a customizable prefix (default: public-
) to filenames.
- Toggle one or multiple attachments (non-Markdown files) between public and private.
- Context menu options dynamically show:
- Make Private if 1+ public files selected.
- Make Public if 1+ private files selected.
- Both options if both types selected.
- Batch rename with automatic Obsidian link updates.
- Customizable prefix string (default:
public
), with automatic hyphen added internally. - Skips non-attachment files silently.
This plugin is intended to be used with Quartz's Explicit Publish and ignorePatterns.
Pre-requisite: Ensure Node and Git are installed on your machine
- Clone this repository as a
git submodule
in your vault at.obsidian/plugins/
git submodule add -f https://github.com/Haroombe/obsidian-quartz-toggle-public-image-plugin obsidian-quartz-toggle-public-image-plugin
- Install dependencies
npm i
- Build the plugin
npm run build
- Enable it in Obsidian’s Community Plugins.
- (Optional) Configure the prefix in plugin settings if you want to change the default.
- Right-click one or more attachments in the file explorer.
- Based on selection, choose to make public or private.
- The plugin will rename files accordingly, adding or removing the prefix.
- Public prefix: The prefix that marks a file as public.
- Users enter the prefix without a hyphen (e.g.,
public
). - The plugin adds the hyphen (
-
) internally for filenames, e.g.,public-filename.png
.
- Users enter the prefix without a hyphen (e.g.,
MIT © Haroombe