Skip to content

An obsidian plugin to toggle an image as public or private by renaming the image with a prefix. Intended for use with Quartz config filters.

License

Notifications You must be signed in to change notification settings

Haroombe/obsidian-quartz-toggle-public-image-plugin

Repository files navigation

Quartz Toggle Public Image Plugin

An Obsidian plugin that toggles attachment files between public and private states by adding or removing a customizable prefix (default: public-) to filenames.

Features

  • 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.

Installation

Pre-requisite: Ensure Node and Git are installed on your machine

  1. 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
  1. Install dependencies
	npm i
  1. Build the plugin
	npm run build
  1. Enable it in Obsidian’s Community Plugins.
  2. (Optional) Configure the prefix in plugin settings if you want to change the default.

Usage

  • 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.

Settings

  • 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.

License

MIT © Haroombe

About

An obsidian plugin to toggle an image as public or private by renaming the image with a prefix. Intended for use with Quartz config filters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published