Smart Image Renamer

unlisted

by Luca Trifilio

Automatically rename pasted images based on the active note's filename.

3 starsUpdated 3mo agoMIT
View on GitHub
Obsidian

Smart Image Renamer

Automatically rename pasted images in Obsidian

No more Pasted image 20231201123456.png cluttering your vault

GitHub Release License: MIT

Features

Automatic renaming on paste

When you paste an image into a note, it's automatically renamed to {NoteName} {suffix}.{ext}.

Example: Pasting into "Meeting Notes.md" creates Meeting Notes 1.png, Meeting Notes 2.png, etc.

Drag & drop support

Images dropped into notes or Excalidraw drawings are renamed using the same logic.

Manual rename

Right-click any image and select "Rename image" to rename it manually. All references across your vault are updated automatically.

Bulk rename

Clean up existing images via command palette:

  • Rename images in current note
  • Rename all images in vault

Filter by generic names (Pasted image, Screenshot, IMG_...) and choose:

  • Replace: Note name + sequential number
  • Prepend: Note name + original name
  • Pattern: Custom with {note}, {original}, {n} placeholders

Find orphaned images

Find images not referenced anywhere and delete or move them to a folder.

Suffix modes

ModeExample
Sequential (default)My Note 1.png, My Note 2.png
TimestampMy Note 20251201-143052.png

Filename sanitization

ModeInputOutput
Normal (default)Caffè & CittàCaffè & Città
AggressiveCaffè & Cittàcaffe_citta

Aggressive mode is useful when syncing with systems that don't handle special characters.

Installation

Community plugins

  1. Open SettingsCommunity plugins
  2. Click Browse and search for "Smart Image Renamer"
  3. Click Install and Enable

Manual / BRAT

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create folder: {vault}/.obsidian/plugins/smart-image-renamer/
  3. Copy files into the folder
  4. Reload Obsidian and enable the plugin

Or use BRAT with: luca-trifilio/obsidian-smart-image-renamer

Settings

SettingDescriptionDefault
Suffix modeSequential or TimestampSequential
Timestamp formatFormat string for timestamp modeYYYYMMDD-HHmmss
Auto-rename on createRename dropped/pasted images automaticallyOn
Suffixes to removeStrip suffixes from note name when generating image name.excalidraw
Aggressive sanitizationURL-friendly filenamesOff

Compatibility

  • Works on desktop and mobile
  • Respects your attachment folder settings
  • Supports Excalidraw

License

MIT - see LICENSE for details.


Made with ❤️ for the Obsidian community

Report BugRequest Feature

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.