Store media:ID in post bodies instead of CDN URLs, and keep sablog attach tokens as a fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
1.2 KiB
1.2 KiB
Media library (xpier)
New uploads, covers, and in-body images/files use xpier/filament-media-library. Sablog Spatie media / attachments rows stay for import and legacy shortcodes.
Markdown body (do not paste CDN URLs)
The editor writes a stable reference. The public URL is resolved only when the page is rendered.
| Format | Image | File |
|---|---|---|
| Markdown |  |
[notes.pdf](media:12) |
| HTML | [media=12] |
[media=12] |
Admin flow: pick a file in Insert from media library, then click Insert into body. That appends the snippet above. Do not copy object-storage / CDN addresses into the article.
Legacy sablog tokens are unchanged: [attach=ID], {{attach:ID}}, .
Admin
- Library:
/admin/media-library - Folders:
/admin/media-folders(defaults:general,articles,banners) - Cover:
MediaPickerbound tocoverMedia/cover_media_id
Config
MEDIA_DISK=public
MEDIA_DIRECTORY=media
MEDIA_VISIBILITY=public
Run php artisan storage:link when using the public disk locally.