A Tropy plugin that copies the file path or a formatted snippet of the selected photo(s) to the clipboard. Three output formats are supported, each configured as a separate plugin instance in Tropy’s preferences.
Tropy’s native tropy:// scheme only opens the application — it cannot be used to display an image. This plugin copies a path that actually works as an image source in Markdown editors (Obsidian, etc.) or web components.
- Download or build the plugin as a
.zipfile. The archive must containpackage.json,index.js, andicon.svgat its root (not inside a subdirectory). - In Tropy: Preferences… > Plugins > Install Plugin, then select the
.zip. - The plugin appears in the list. Configure one or more instances (see below).
Tropy’s plugin API creates one Export sub-menu entry per configured plugin instance. To get three separate entries, add the plugin three times in Preferences > Plugins using the + button, and configure each instance:
| Instance name | action option |
|---|---|
| Copy Link | link |
| Copy for Markdown | md |
| Copy for Reframe | reframe |
After saving, the Export sub-menu will show:
File > Export Item
├── …
├── Copy Link
├── Copy for Markdown
└── Copy for Reframe
| Field | Default | Description |
|---|---|---|
action |
link |
Output format: link, md, or reframe (see below). |
format |
path |
For action: link only. path copies a plain file path; uri copies a file:// URI. |
separator |
\n |
String used to join results when multiple photos are selected. |
/Users/alice/Pictures/DP155021.jpg
With format: uri:
file:///Users/alice/Pictures/DP155021.jpg
The caption is built from the item’s Dublin Core metadata: title, date, and source, separated by . . Missing fields are omitted.
<rf-canvas src="file:///Users/alice/Pictures/DP155021.jpg"><rf-text>Inauguration du musée. 1924. Archives nationales.</rf-text></rf-canvas>Tropy’s plugin API does not expose keyboard accelerators for plugin menu entries. As a workaround on macOS, you can assign shortcuts via System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts:
- Click +, select Tropy as the application.
- Set the menu title to the exact name of the instance (e.g.
Copy Link). - Assign the desired shortcut (e.g.
⇧⌘C).
The caption is read from the first non-empty value found under these JSON-LD property keys:
| Field | Keys tried (in order) |
|---|---|
| Title | title, dc:title, dcterms:title |
| Date | dc:date, dcterms:date, dcterms:created |
| Source | dc:source, dcterms:source |
Both plain strings and language-tagged { "@value": "..." } objects are handled.
- Photos imported from the web (
http/https) are passed through as-is; theirpathis already a usable URL. - The
pathfield reflects the location Tropy currently tracks. In a Standard project this points to Tropy’s internal copy; in an Advanced (.tpy) project it points to the file you manage yourself. If the original file has been moved without consolidation, the path may be stale. - If no item is selected, Tropy passes the entire project to the plugin, which will copy the paths of all photos.
To test without reinstalling the zip after each change, create a symlink from this directory to Tropy’s plugins folder (visible from Tropy’s Help menu), then reload the project window (Cmd+R with DevTools open).
Logs and notifications are also written to tropy.log (Tropy’s log folder, accessible from the Help menu).
To add a new output format, add one entry to the formatters getter in index.js and document the new action value in package.json’s option hint.