Customize attachment location with variables($filename, $data, etc) like typora.
- Modify location for attachment folder.
- Modify filename for Pasted Files.
- Same to "Files & Links -> Default location for new attachments".
${filename}
representing for current note filename.${date:format}
representing for the current date/time using Moment.js formatting.- Put "./" at the beginning of the path if you want to use relative path.
- example:
assets/${filename}
,./assets/${filename}
,./assets/${filename}/${date:YYYY}
${filename}
representing for current note filename.${date:format}
representing for the current date/time using Moment.js formatting.${originalCopiedFilename}
representing for original copied to clipboard filename.${prompt}
representing the value asked from the user prompt.- example:
${originalCopiedFilename}-${date:YYYYMMDDHHmmssSSS}
,${filename}-img-${date:YYYYMMDD}
- Obsidian default:
Pasted image YYYYMMDDHHmmss
. - Note: This setting only changes image filename from clipboard. If your attachment is copied from the explorer, obsidian will just copy the original file to the attachment folder without renaming.
Automatically update attachment folder name if "Location for New Attachments" contains ${filename}
.
- Automatically update attachment files in target md file if "Pasted Image Name" contains
${filename}
. - Just simply substitute
${filename}
string in attachment filename. So it may be dangerous if multiple files share the same prefix.
Automatically replace whitespace in attachment folder and file name with hyphens.
Automatically set all characters in folder name and pasted image name to be lowercase.
Paste images from clipboard converting them to JPEG.
The smaller the quality, the greater the compression ratio.
If enabled and Convert pasted images to JPEG
setting is enabled, images drag&dropped into the editor will be converted to JPEG.
If enabled, attachments dragged and dropped into the editor will be renamed according to the Pasted File Name
setting.
Custom Attachment Location
is available in the official Community Plugins repository.- Beta releases can be installed through BRAT.