Anuj Dhakal203 downloadsAutomatically add icons ( materials, uicons etc ) to files and folders based on frontmatter, custom rules, and file type. auto icon
An Obsidian plugin that automatically adds icons to files and folders in the file explorer — no manual tagging of every item required.
Icons are resolved for each file and folder in this priority order:
Per-item icons — right-click any file or folder in the explorer and choose Set icon. Notes store the icon in frontmatter; folders and other files are remembered by the plugin (and follow the item through renames and moves).
Frontmatter icons — give any note an icon by adding a property to its frontmatter:
---
icon: lucide-rocket
---
The property name is configurable (default: icon). Emoji work too (icon: 📚), and icon: none hides the icon for that note entirely. Use the Set icon for current file command to pick an icon from a searchable list — the frontmatter is updated for you.
Custom rules — assign icons automatically based on:
Projects/ gets a briefcase icon (applies to the folder and everything inside it).excalidraw files get a pencil icon#project gets a briefcase icon (nested tags like #project/web match too)Each rule can target files, folders, or both, and can optionally assign a fixed color. Rules are checked top to bottom and the first match wins; rules can be reordered in settings.
Default icons by file type — images, audio, video, PDF, canvas, code, archives, and spreadsheets get a sensible icon out of the box. Can be turned off.
Beyond the file explorer, icons also show in tab headers, next to inline titles, and on internal links in reading view — each surface can be toggled independently, and icon size is adjustable.
Anywhere an icon can go, an emoji can go instead: type or paste one into the icon picker and it appears as the first suggestion, or write it straight into frontmatter.
All icons come from the icon set built into Obsidian (Lucide) by default, so they automatically match your theme in both light and dark mode.
Beyond Lucide, every icon picker (frontmatter, rules, default folder/note icon) can also search four bundled icon sets:
All four are bundled into the plugin at build time — nothing is downloaded at runtime, and the plugin makes no network requests.
Pick one under Settings → Icon style to re-skin every automatic icon at once — all the per-extension file-type icons plus the default folder and note icons switch to that pack's equivalent. Frontmatter and custom rules are unaffected and can still use any icon from any pack regardless of this setting. If a pack doesn't have a suitable icon for a particular file type, that one falls back to the Lucide icon instead of showing nothing.
Turn on Colorful icons to give every file and folder a color from a palette (red, orange, yellow, green, teal, blue, purple, pink by default — every color is editable in settings), chosen deterministically from its path — the same item always gets the same color, so nothing shifts between reloads. Individual rules can override this with a fixed color of their own.
Both are also available by right-clicking any file or folder in the explorer.
main.js, manifest.json, and styles.css from the latest release.<your-vault>/.obsidian/plugins/autoicons/.Requires Node.js 18+.
npm install
npm run dev # build in watch mode
npm run build # type-check and produce a production build
To test locally, clone this repository into <your-vault>/.obsidian/plugins/autoicons/ and run npm run dev, then enable the plugin in Obsidian.
npm run dev/npm run build first run scripts/generate-icon-packs.mjs, which reads the @iconify-json/* packages and writes bundle-ready icon data to src/generated/ (gitignored, regenerated on every build).
npm version patch|minor|major — this bumps package.json, manifest.json, and versions.json.main.js, manifest.json, and styles.css attached.Bundled at build time, no network requests involved: