assets/ directory.
Overview
Attachments in Glyph:- Content-addressed: Files are named by their SHA256 hash
- Deduplicated: Identical files are stored only once
- Persistent: Files remain available even if the source is deleted
- Portable: All assets travel with your space
- Efficient: No file size bloat from duplicates

Attaching Files
From the Editor
Use the attach command
Click the attachment button in the editor toolbar or use the slash command
/attach.Supported File Types
Glyph handles all file types but provides special treatment for: Images (auto-embedded):- PNG (
.png) - JPEG (
.jpg,.jpeg) - GIF (
.gif) - WebP (
.webp) - SVG (
.svg)
- PDFs, documents, spreadsheets, etc.
- Generic files use standard markdown links
Content-Addressed Storage
How It Works
Example
Original file:~/Downloads/diagram.png
SHA256 hash: a3b5c8d9e1f2... (64 hex characters)
Stored as: .glyph/assets/a3b5c8d9e1f2...png
Markdown: 
Benefits
Deduplication
Attach the same image to 10 notes, it’s stored only once.
Integrity
File corruption is detectable—hash mismatch means the file changed.
Portability
Copy your space folder anywhere, all assets come with it.
No name conflicts
Hash-based names eliminate filename collisions.
Markdown Syntax
Images
Images use standard markdown image syntax:Other Files
Non-image files use standard link syntax:Relative Paths
Asset links use relative paths:- Notes in root:
../assets/ - Notes in subfolders:
../../assets/or deeper depending on note location
Storage Location
All assets live in:Why .glyph/assets/?
- Centralized: All assets in one place
- Hidden:
.glyphis a hidden directory (won’t clutter your file browser) - Protected: Separate from your notes, less likely to be accidentally deleted
- Portable: Move
.glyphwith your notes, everything stays linked
File Preview
Glyph provides in-app preview for attachments:Image Preview
Images display inline in the editor:- Click to expand full-size
- Drag to reposition (markdown syntax)
- Alt text supported for accessibility
File Info
Hover over a file link to see:- Filename (original extension preserved)
- File size
- MIME type
External Opening
Click non-image file links to open in your system’s default app:- PDFs → PDF viewer
- Documents → Word/LibreOffice/etc.
- Spreadsheets → Excel/Sheets/etc.
Managing Attachments
Finding Unused Assets
Glyph doesn’t automatically delete assets when you remove markdown links. To clean up:Future versions may include automatic orphan detection and cleanup.
Renaming Assets
Don’t rename files inassets/ manually:
- Hash-based names are computed, not arbitrary
- Renaming breaks all markdown references
- Re-attach the file instead to generate a new hash
Moving Notes
When moving notes between folders:- Glyph auto-updates relative asset paths
- Links remain functional after the move
- No need to manually fix
../assets/paths
Backing Up Assets
Include.glyph/assets/ in your backup strategy:
- Git: Add
.glyph/assets/to your repository - Cloud sync: Ensure
.glyphis not ignored - Manual backups: Copy entire space folder including
.glyph
File Size Considerations
Storage Limits
Glyph has no built-in file size limits, but consider:- Large files slow sync: If using Git or cloud sync, big assets increase sync time
- Disk space: Assets accumulate over time
- Performance: Massive image files may slow rendering
Recommendations
- Optimize images: Use compressed formats (WebP, JPEG) over raw (PNG)
- Limit file sizes: Keep individual files under 10 MB for best performance
- Use external hosting for large media: Link to YouTube, Vimeo, etc. instead of embedding large videos
Advanced: Manual Attachment API
Attach files programmatically using the Tauri command:asset_rel_path: Path relative to space rootmarkdown: Ready-to-insert markdown syntax
Use Cases
- Custom importers
- Automation scripts
- Plugin development
- Batch attachment processing
Atomic Writes
File imports use atomic writes for safety:
Benefits:
- Crash-safe: Interrupted imports don’t corrupt assets
- Deduplication-aware: If hash already exists, temp file is discarded
- No partial writes: File appears only when fully written
Deduplication Example
Scenario
You have the same screenshot in two places:~/Desktop/bug-report.png~/Downloads/bug-report-copy.png
Attachment Process
Attach first file
Attach
~/Desktop/bug-report.png to notes/project-a.md.→ Stored as assets/a3b5c8d9e1f2...pngResult
Both notes reference the same asset: notes/project-a.md:assets/, saving disk space.
Security
SHA256 Hashing
- Collision-resistant: Virtually impossible to create two files with the same hash
- Integrity checking: Verify file hasn’t been tampered with
- Not encryption: Files are stored unencrypted (plaintext)
SSRF Protection
Glyph’s attachment system is local-only:- No URL-based attachments (prevents SSRF attacks)
- All files come from your filesystem
- No remote fetching or automatic downloads
Permissions
Attachments require:- Read permission on source file
- Write permission on
.glyph/assets/directory
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
/attach | Open file picker |
| Click image | Expand preview |
| Click link | Open in default app |
Best Practices
- Optimize before attaching - Compress images to reduce space
- Use descriptive alt text - Helps with accessibility and searchability
- Don’t rename in assets/ - Always re-attach instead
- Include assets in backups - Don’t ignore
.glyph/assets/ - Clean up orphans periodically - Prevent asset bloat over time
- Use external hosting for videos - Embed YouTube/Vimeo instead of attaching large files
- Test links after moving notes - Verify relative paths still work
Limitations
- No built-in orphan detection (yet)
- No automatic thumbnail generation
- No image editing/cropping in-app
- No direct camera/screenshot integration (use system tools, then attach)
- No cloud asset hosting (files are local only)
Related Features
- AI Chat - Attach images to AI conversations with vision models
- Tags & Search - Find notes containing specific images
- Markdown Editor - Embed images in your notes
- Space System - Learn about content-addressed storage