The NotePix plugin automates the process of handling images inside your notes by uploading them directly to a GitHub repository. When you paste or drag an image into a note, it is instantly uploaded and the local link is replaced with either a fast CDN hosted URL for public repos or a secure internal link for private ones. This keeps your vault lightweight while ensuring your images remain accessible anywhere. It supports both desktop and mobile, provides AES-GCM encryption for your GitHub Personal Access Token and allows you to configure repository details, branches and folder paths. In private mode, images are displayed seamlessly in Reading View through secure token based fetching.
This plugin requires a GitHub repository to store uploaded images, which can be either public or private.
It requires a GitHub Personal Access Token with
repopermissions for uploading images securely.
NotePix v1.3.0 - Major UX Improvements & Flexible Token Management
This release brings significant improvements to the user experience, especially for private repository workflows, with flexible authentication options and smarter prompt handling.
🎯 Major Features
🔓 Optional Encryption & Flexible Token Management
You now have two ways to store your GitHub Personal Access Token:
Option 1: Encrypted (Recommended for security)
- Master password protection with AES-GCM encryption
- Password prompted once per session
- Token decrypted and cached in memory
Option 2: Plain Token (Convenient for personal vaults)
- No master password required
- Direct token storage in settings
- Instant access without prompts
How it works:
- Toggle "Enable Encryption" ON/OFF in settings
- When OFF: Single "GitHub Personal Access Token (plain)" field appears
- When ON: Master password + PAT fields + "Save Encrypted Token" button
- Unified
getToken()method handles both modes seamlessly
🎨 Smart Hover Detection
No more intrusive password prompts during previews!
The plugin now intelligently detects when you're viewing content in:
- Main document view: Prompts for password once per session ✅
- Hover previews: Uses cached token automatically, no prompts! ✅
- Page previews: Seamless experience without interruptions ✅
Technical implementation:
- Workspace leaf containment checking (
activeLeaf.containerEl.contains()) - Falls back to
app.renderContext.hoverPopoverAPI - Robust detection replacing fragile DOM selectors
User experience:
- Open a note with private images in main pane → Password prompt (once)
- Hover over any link to preview → Images load instantly, no prompts
- All subsequent hovers → Smooth, uninterrupted workflow
🤖 Auto-Upload from Watched Folders
Flexible attachment workflow with customizable folder watching:
New Settings:
- Auto-upload: Toggle automatic uploads for images in watched folders
- Local Image Folder: Default folder for "save locally" on paste
- Extra Watched Folders: CSV list of additional folders to watch
How it works:
- Create or move images into watched folders → Automatic upload (if enabled)
- Images outside watched folders → Never auto-uploaded
- Supports: png, jpg, jpeg, gif, bmp, svg
Paste workflow options:
uploadOnPaste='always'→ Saves to upload folder, auto-uploads, replaces with URLuploadOnPaste='ask'→ Prompts user; on decline saves to local folder as![[...]]
🎯 Smart Prompt Policy
Prompts only appear when actually needed:
- Before: Prompt might appear on startup or when opening any note
- Now: Prompt only when encountering NotePix images
- Session-based caching prevents repeated prompts
- Works seamlessly with both encrypted and plain token modes
✨ UX Improvements
Settings Enhancements
- Browse buttons for folder selection from vault folders
- Folder validation with inline red border for invalid paths
- Watched folders UI:
- Per-row Browse button
- Optional label input
- Up/Down reorder buttons
- Remove row functionality
- Conflict detection: Prevents duplicates and folder conflicts
Better Error Handling
- Missing token shows clear notices, operations abort gracefully
- Private repo fetch failures (404, auth) show fallback without crashing
- Validation messages guide users through setup
Folder Management
- Upload folder and local folders can't overlap with watched folders
- Automatic deduplication on save
- Clear visual feedback for configuration errors
🐛 Bug Fixes
- ✅ Fixed password prompts appearing in hover/page previews
- ✅ Fixed detection logic causing prompts in wrong contexts
- ✅ Improved token retrieval reliability across different view types
📚 Documentation
- Updated README with all new features
- Added Smart Hover Detection documentation
- Removed CDN references (correctly describes GitHub-hosted links)
- Comprehensive dev notes with implementation details
- Added test cases for all new features
🛠️ Technical Changes
- Implemented
MyPlugin.getToken()unified token retrieval - Workspace leaf containment for hover detection
- Session-based token caching architecture
- Vault "create" event handler for auto-upload
- Settings UI refactored for encryption toggle
- Added
.gitignorefor development files
📦 Installation
Install from Obsidian's Community Plugins browser or download from the releases page.
Required Files
main.jsmanifest.jsonstyles.css
🔄 Upgrading from 1.2.x
No breaking changes! Simply update the plugin:
- Your existing encrypted tokens will continue to work
- New "Enable Encryption" toggle appears in settings (defaults to ON for existing users)
- To switch to plain token mode: Toggle OFF and enter your PAT
- All existing settings and preferences are preserved
🧪 What's Been Tested
✅ Encryption ON/OFF modes
✅ Hover detection in all contexts (main pane, hover, backlinks)
✅ Auto-upload from watched folders
✅ Paste workflow (always/ask modes)
✅ Folder validation and conflict detection
✅ Token caching across session
✅ Private repo image rendering
✅ Error handling and edge cases
🙏 Support
If you find this plugin useful, consider supporting development! ☕
Full Changelog: https://github.com/AyushParkara/NotePix/compare/1.2.0…1.3.0
Built with ❤️ by Ayush Parkara