Skip to main content
Experimental. This Module has no test or production evidence recorded yet. Read it, run it locally, and hold off on real Orders. See maturity levels.
The Media Module is your store’s digital asset manager. You upload images, videos, and other files through the shared upload endpoint, then organize them into folders, tag them, and display them on the Storefront with the Module’s image, gallery, and video components. Store endpoints are read-only; every create, update, and delete operation requires admin access. Source: modules/media · npm: @86d-store/media

Installation

Then register the Module in your store’s config.json:

Configuration

string
default:"\"10485760\""
Maximum file size in bytes. Defaults to 10 MB (10485760). This value is a string for module config compatibility.
string
Comma-separated list of allowed MIME types. Defaults to all types when omitted. Example: "image/png,image/jpeg,image/webp,video/mp4".

File upload

Upload files through the shared Store Runtime upload endpoint, not through the Media Module’s own endpoints. The upload endpoint is admin-only. Supported file types and size limits: After uploading, create an asset record via the admin API to register the file URL in the media library.

Store endpoints

Store endpoints are read-only and publicly accessible.

Admin endpoints

Admin endpoints require authentication.

Assets

Folders

Components

Add these components to your MDX Template files. The media 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.
string
required
Asset ID to display.
string
CSS class applied to the container element.
boolean
default:"false"
When true, renders the asset name as a caption below the image.
Use 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.
string
Filter assets by folder ID.
string
Filter by type: "image", "video", or any MIME type prefix (e.g. "image/png").
string
Filter assets by a single tag.
number
default:"12"
Number of items per page.
Use 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.
string
required
Asset ID of the video to play.
boolean
default:"false"
Auto-play the video (muted) when it becomes visible in the viewport.
boolean
default:"false"
Loop playback continuously.
string
CSS class applied to the container element.
Use VideoPlayer for product demo videos, promotional content, or tutorial sections.

Types

Notes

  • Folders support nesting via parentId. Use GET /admin/media/folders?parentId=folder_id_here 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 tag query parameter.
  • bulkDelete and moveAssets accept arrays of asset IDs, so one call can delete or move a whole batch.
  • getStats() returns totals broken down by MIME type and folder, useful for storage reporting.