Files
goukiandCursor 64655ced1e
Build and Deploy / verify (push) Successful in 35s
Build and Deploy / deploy (push) Successful in 33s
feat: use xpier media library for uploads and markdown embeds
Store media:ID in article bodies instead of CDN URLs, and keep sablog attach tokens as a fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 19:03:52 +00:00

1.1 KiB

Media library (xpier)

New uploads, covers, and in-body images/files use xpier/filament-media-library. The sablog attachments table and attach: protocol stay for import/legacy content.

Markdown body (do not paste CDN URLs)

Store a library id, never a bucket/CDN URL. Rendering expands it to the current public URL.

Format Image File
Markdown ![alt](media:12) [notes.pdf](media:12)
HTML [media=12] [media=12]

Admin flow: pick a file, then Insert into body. Markdown keeps media:ID; HTML keeps [media=ID].

Legacy tokens stay valid: ![alt](attach:ID), [attach=ID], /attachment.php?id=ID.

Admin

  • Library: /admin/media-library
  • Folders: /admin/media-folders (defaults: general, articles, banners)
  • Cover: cover_media_id via MediaPicker (coverMedia relation). cover_path remains for older auto-covers.

Config

MEDIA_DISK=public
MEDIA_DIRECTORY=media
MEDIA_VISIBILITY=public

Run php artisan storage:link when using the public disk locally.