RainCat1998 / obsidian-custom-attachment-location

Customize attachment location with variables($filename, $data, etc) like typora.
MIT License
205 stars 36 forks source link

Obsidian Custom Attachment location

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

Features

Settings

Location for New Attachments

Pasted File Name

Automatically rename attachment folder

Automatically update attachment folder name if "Location for New Attachments" contains ${filename}.

Automatically rename attachment files

Replace whitespace with hyphen

Automatically replace whitespace in attachment folder and file name with hyphens.

All lowercase names

Automatically set all characters in folder name and pasted image name to be lowercase.

Convert pasted images to JPEG

Paste images from clipboard converting them to JPEG.

JPEG Quality

The smaller the quality, the greater the compression ratio.

Convert images on drag&drop

If enabled and Convert pasted images to JPEG setting is enabled, images drag&dropped into the editor will be converted to JPEG.

Rename only images

If enabled, only image files will be renamed.

If disabled, all attachment files will be renamed.

Rename pasted files with known names

If enabled, pasted copied files with known names will be renamed.

If disabled, only clipboard image objects (e.g., screenshots) will be renamed.

Rename attachments on drag&drop

If enabled, attachments dragged and dropped into the editor will be renamed according to the Pasted File Name setting.

Rename attachments on collecting

If enabled, attachments processed via Collect attachments commands will be renamed according to the Pasted File Name setting.

Duplicate name separator

When you are pasting/dragging a file with the same name as an existing file, this separator will be added to the file name.

E.g., when you are dragging file existingFile.pdf, it will be renamed to existingFile 1.pdf, existingFile 2.pdf, etc, getting the first name available.

Default value is ` (space`).

Keep empty attachment folders

If enabled, empty attachment folders will be preserved, useful for source control purposes.

Delete orphan attachments

If enabled, when the note is deleted, its orphan attachments are deleted as well.

Changelog

All notable changes to this project will be documented in the CHANGELOG.

Installation

Support

Buy Me A Coffee

License

© RainCat1998

Maintainer: Michael Naumov