The media module is your store’s digital asset manager. You upload images, videos, and other files through the platform’s upload API, then use the media module to organize those assets into folders, apply tags, and display them on the storefront. The store-facing components handle images, galleries, and video playback. All create, update, and delete operations require admin access; store endpoints are read-only. Source:Documentation Index
Fetch the complete documentation index at: https://86d.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
modules/media · npm: @86d-app/media
Installation
config.json:
Configuration
Maximum file size in bytes. Defaults to 10 MB (10485760). This value is a string for module config compatibility.
Comma-separated list of allowed MIME types. Defaults to all types when omitted. Example:
"image/png,image/jpeg,image/webp,video/mp4".File upload
Files are uploaded through the platform’s shared upload endpoint, not through the media module endpoints directly. The upload endpoint is admin-only.| Method | Path | Description |
|---|---|---|
POST | /api/upload | Upload a file (admin only) |
DELETE | /api/upload | Delete an uploaded file (admin only) |
| Type | Formats | Max size |
|---|---|---|
| Images | JPEG, PNG, WebP, GIF, SVG | 4.5 MB |
| Documents | 10 MB | |
| Video | MP4 and other types per allowedMimeTypes | Per maxFileSize config |
Store endpoints
Store endpoints are read-only and publicly accessible.| Method | Path | Description |
|---|---|---|
GET | /media | List assets, filterable by folder, MIME type, and tag |
GET | /media/:id | Get a single asset by ID |
Admin endpoints
Admin endpoints require authentication.Assets
| Method | Path | Description |
|---|---|---|
GET | /admin/media | List all assets, filterable by folder, MIME type, tag, and search query |
POST | /admin/media/create | Create a new asset record |
GET | /admin/media/:id | Get an asset by ID |
PUT | /admin/media/:id/update | Update asset metadata (name, alt text, tags, folder) |
DELETE | /admin/media/:id/delete | Delete an asset |
POST | /admin/media/bulk-delete | Bulk-delete multiple assets by ID |
POST | /admin/media/move | Move assets to a different folder |
GET | /admin/media/stats | Get media library statistics |
Folders
| Method | Path | Description |
|---|---|---|
GET | /admin/media/folders | List folders, filterable by parentId |
POST | /admin/media/folders/create | Create a new folder |
PUT | /admin/media/folders/:id | Rename a folder |
DELETE | /admin/media/folders/:id/delete | Delete a folder |
Components
Add these components to your MDX template files. Themedia module must be listed in config.json.
ImageDisplay
Displays a single image asset by ID. Fetches the asset, renders it with proper alt text, and optionally shows a caption.
Asset ID to display.
CSS class applied to the container element.
When
true, renders the asset name as a caption below the image.ImageDisplay for hero images, content blocks, or anywhere you need to render a single managed image.
MediaGallery
Filterable grid of media assets. Images render as thumbnails, videos show a poster frame with a play overlay, and other file types display a label. Supports pagination and item selection. Fetches its own data.
Filter assets by folder ID.
Filter by type:
"image", "video", or any MIME type prefix (e.g. "image/png").Filter assets by a single tag.
Number of items per page.
MediaGallery on gallery pages, lookbook sections, or anywhere you want a browsable media grid.
VideoPlayer
Embedded HTML5 video player. Fetches a video asset by ID and renders it with native browser controls.
Asset ID of the video to play.
Auto-play the video (muted) when it becomes visible in the viewport.
Loop playback continuously.
CSS class applied to the container element.
VideoPlayer for product demo videos, promotional content, or tutorial sections.
Types
Notes
- Folders support nesting via
parentId. UseGET /admin/media/folders?parentId=<id>to list a folder’s children. - Tags are stored as a JSON string array. You can filter by one tag at a time using the
tagquery parameter. bulkDeleteandmoveAssetsoperate on arrays of asset IDs for efficient batch processing.getStats()returns totals broken down by MIME type and folder, useful for storage reporting.- Store endpoints are read-only. All create, update, and delete operations require admin authentication.

