Skip to content

v0.2.0 — Upload image at cursor

Choose a tag to compare

@atbeta atbeta released this 25 Jul 03:11
a66c295

New: upload image that's already in your note

Three ways to invoke:

  1. Command palettePicFast: Upload image at cursor to PicFast. Only appears when the cursor sits inside a markdown / wikilink image reference that points at a local file.

  2. Right-click menu — the same command shows up in the editor context menu when the cursor is over an image link.

  3. Existing paste / drop handlers (unchanged from v0.1.4).

Recognised link forms

  • ![alt](local-path.png) — standard markdown
  • ![[local-path]] / ![[path|300]] — Obsidian wikilink (size / alt suffixes stripped)
  • http:// / https:// / data: URLs — skipped, the plugin tells you it's already remote

Path resolution:

  • URL-decoded (%20 → space etc.)
  • Strips leading ./ and chains of ../
  • Falls back to trying .png/ .jpg/ .jpeg/ .gif/ .webp/ .svg/ .bmp/ .avif when the wikilink omitted the extension

Failure handling

Every failure path surfaces a Notice and leaves the markdown untouched:

  • Already a remote URL → Notice "this image is already remote"
  • Can't resolve path → Notice with the resolved path search list
  • Can't read file (permission, vault race) → Notice
  • Upload error → existing performUpload Notice

Replacement

Always ![alt](remote-url) regardless of whether the original was a markdown link or wikilink. Obsidian renders both identically for remote URLs.

Install

Same path: overwrite the 3 files in .obsidian/plugins/picfast-image-uploader/. Settings are forward-compatible — no migration needed.