No description
Find a file
2026-05-03 13:53:05 -07:00
.gitignore Initial release: Import Fixer 1.0.0 2026-05-02 21:41:03 -07:00
LICENSE update author name 2026-05-03 13:53:05 -07:00
main.js Add settings tab and confirmation modal; flip to desktop-only 2026-05-03 13:37:57 -07:00
manifest.json update author name 2026-05-03 13:53:05 -07:00
README.md Drop empty styles.css; plugin has no custom styles 2026-05-03 13:43:15 -07:00
versions.json Initial release: Import Fixer 1.0.0 2026-05-02 21:41:03 -07:00

Import Fixer

Cleans up notes imported into Obsidian from web clippers (Evernote, etc.). Targets the common artifacts:

  • Header favicons that render at 200+ px and dominate the note
  • Reddit/Twitter/Zhihu UI icons (avatars, community badges, tracking pixels) scattered through the body
  • Embedded ![[]] icons stuffed inside the link text of […](url) references
  • _resources/<long ugly name>.resources/ folders left behind by Evernote import
  • Broken ![[…/X.resources/file.ext]] links pointing at folders that have since been renamed

sample document

image image

Commands

Command What it does
Auto-fix current note (all fixes) Runs Repair broken resource links then Shrink small UI icons in one shot.
Repair broken resource links in current note For each ![[…/X.resources/file.ext]] link where X.resources no longer exists, scans every res_*.resources folder, finds the one containing the most of the missing files, and rewrites the link to point there.
Shrink small UI icons in current note Adds |48 to wiki-link image embeds whose filename matches known icon patterns (favicons, avatars, Reddit communityIcon_*, Zhihu embedded.svg, web-1.0 spacer.gif, etc.). Random-hash content image filenames don't match and stay untouched.
Strip embedded icons On the current selection, removes ![[…]] image embeds nested inside […](url) link text — leaves the link alone.

Icon patterns recognised by Shrink

Favicons: touch.*, apple-touch-icon*, favicon*, logo[.-_]* Generic prefixes: ico_*, ico-*, icon_*, emoji_* Avatars: avatar*, default-avatar*, default_profile*, profile_image*, gravatar*, octocat* Reddit: communityIcon*, image_widget_*, svg_<n>.svg, renderTimingPixel* Zhihu / Twitter / SO: embedded.svg, zhihu-*, verified*, flair* Spacers: spacer.*, pixel.*, 1x1.*, clear.*, transparent.*, blank.*, placeholder.* Loaders: loading*, loader*, spinner* UI words: arrow|chevron|bullet|dot|bg|bar|line|left|right|up|down|prev|next|star|check|cross|tick|caret|plus|minus|close|center|top|bottom|divider|separator|corner|border|frame|tab|header|footer followed by an optional suffix and extension.

  1. Index every file inside every res_*.resources folder under <note folder>/_resources/.
  2. Walk every ![[…/X.resources/file.ext]] link in the note.
  3. For broken folder references (where X.resources doesn't exist), tally which existing folders contain the referenced filenames.
  4. The folder with the most matches wins; rewrite each broken link to point at it.

This handles the case where a previous import-cleanup run renamed folders but crashed before saving updated links.

Install (manual)

  1. Download main.js and manifest.json from the latest Release.
  2. Drop them into <vault>/.obsidian/plugins/import-fixer/.
  3. Enable Import Fixer in Settings → Community plugins.

Build

There is no build step — main.js is plain JavaScript using Obsidian's runtime API directly.

Notes

  • Tested on macOS desktop with an iCloud-synced vault. Mobile is untested; the manifest currently sets isDesktopOnly: false, but if you run on mobile please report any issues.
  • The repair command is destructive (it rewrites note content). Back up your vault or work on a copy the first time you run it.
  • Console logs are gated behind DEBUG = false at the top of main.js. Flip to true to see per-link decisions in the dev console.

License

MIT — see LICENSE.