Smart Image Renamer
unlistedby Luca Trifilio
Automatically rename pasted images based on the active note's filename.
Smart Image Renamer
Automatically rename pasted images in Obsidian
No more Pasted image 20231201123456.png cluttering your vault
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
| Mode | Example |
|---|---|
| Sequential (default) | My Note 1.png, My Note 2.png |
| Timestamp | My Note 20251201-143052.png |
Filename sanitization
| Mode | Input | Output |
|---|---|---|
| Normal (default) | Caffè & Città | Caffè & Città |
| Aggressive | Caffè & Città | caffe_citta |
Aggressive mode is useful when syncing with systems that don't handle special characters.
Installation
Community plugins
- Open Settings → Community plugins
- Click Browse and search for "Smart Image Renamer"
- Click Install and Enable
Manual / BRAT
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create folder:
{vault}/.obsidian/plugins/smart-image-renamer/ - Copy files into the folder
- Reload Obsidian and enable the plugin
Or use BRAT with: luca-trifilio/obsidian-smart-image-renamer
Settings
| Setting | Description | Default |
|---|---|---|
| Suffix mode | Sequential or Timestamp | Sequential |
| Timestamp format | Format string for timestamp mode | YYYYMMDD-HHmmss |
| Auto-rename on create | Rename dropped/pasted images automatically | On |
| Suffixes to remove | Strip suffixes from note name when generating image name | .excalidraw |
| Aggressive sanitization | URL-friendly filenames | Off |
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
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.