Highlights
SummerCMS 0.6.10 introduces a built-in Media Library (modules/album) with Postgres-indexed metadata, virtual folders, immutable public URLs, synchronous WebP responsive variants, an embedded admin browser and picker, a type: mediafinder form field, unified Mail Images, and 7 built-in Media Library MCP tools.
Added
- Core Media Library (
modules/album): Postgres-indexedsummer_media_folders,summer_media_items, andsummer_media_upload_tokenstables with immutablemedia/<short-id>/<slug>.<ext>blob keys so moving items between folders or editing metadata never breaks published URLs. - Zero-DB-hit static serving and signed uploads (
surf):GET/HEAD /media/{short_id}/{file}serves blobs directly from the storage bucket with strict segment validation,Cache-Control: public, max-age=31536000, immutable,X-Content-Type-Options: nosniff, sandboxing CSP, andContent-Disposition: attachmentfor non-inline files. Single-use DB-backed upload tokens powerPUT/POST /media/upload/{token}with atomic token consumption and MIME enforcement. - Automatic WebP responsive variants: Raster image uploads synchronously generate non-upscaling
480w,960w, and1600wWebP variants stored beside the original and exposed assrcset. - Admin Media Library UI and
type: mediafinder: New/mediaadmin screen with virtual folder tree, grid/list views, debounced search, type filters, drag-and-drop uploads, inspector panel, hard-delete confirmation, reusableMediaPickerModal,MediaFinderField, andsummer-media-pickcustom-element event wiring for plugin editors. - Built-in Media Library MCP tools: Auto-mounted
summercms.mediatools (media_prepare_upload,media_upload,media_list,media_get,media_update,media_delete,media_create_folder) under thebackendguard withmedia:readandmediatoken scopes.
Changed
- Mail Images unified over
modules/album: Mail image uploads now store under the rootmailvirtual folder inmodules/albumwith automatic WebP variants while preserving existing/uploads/...URLs via idempotent backfill.
Fixed
- CSRF handling for in-process MCP dispatch: In-process
backenddispatches frompiernow passcabana's CSRF guard so write MCP tools work without synthetic browser headers. - Scoped Mail Image access:
GET /mail/images/{id}andMailBrandSettinglogo validation are strictly scoped to inline raster images inside the rootmailfolder. - Folder conflicts and
HEADserving: Duplicate sibling folder slugs return409 Conflictinstead of500,cabanarecomputes variant URLs from current storage config, andHEADrequests on/media/{short_id}/{file}serveContent-Lengthfrom bucket attributes without opening a reader.