Features

Media Library

The Media Library provides a unified interface for managing all uploaded media assets. It aggregates files from every upload-enabled collection into a single browsable view with filtering, search, drag-and-drop upload, and bulk actions.

Setup

Import the page component and mount it in your Astro routing:

---
import VextroMediaLibraryPage from "vextro/pages/VextroMediaLibraryPage.astro";
---

<VextroMediaLibraryPage
  convex={convex}
  api={api}
  basePath="/admin"
  config={config}
/>

Page props

PropTypeRequiredDescription
convexConvexClientYesConvex client instance.
apiAdminAPIYesAdmin API reference from createVextroAdminModule.
brandNamestringNoCustom brand name displayed in the header. Defaults to "Vextro".
basePathstringNoURL base path for routing links.
configVextroConfigNoVextro configuration object.

Features

Folder navigation

A sidebar displays folders and media type counts. Click a folder or type to filter the grid view to matching assets.

Grid view

Media items display as a responsive grid with thumbnails. Items are sortable and support these sort options:

SortDescription
newestMost recently uploaded first (default).
oldestOldest uploads first.
name-ascAlphabetical A-Z by filename.
name-descAlphabetical Z-A by filename.
size-ascSmallest files first.
size-descLargest files first.

Filtering

Filter media using query parameters:

ParameterValuesDescription
typeall, image, video, audio, documentFilter by media type.
collectionCollection slugFilter to a specific upload collection.
folderFolder pathFilter to a specific folder.
qSearch stringSearch by name, filename, alt text, or tags.

Upload

Drag and drop files onto the grid area or use the upload button. The page handles file uploads via POST with form-based intent dispatching.

Detail panel

Click any media item to open a detail panel showing metadata (filename, type, size, dimensions) with inline editing for alt text, tags, and other fields. Metadata changes are submitted through the page action and refresh the library's server-rendered data, so saved values remain current after closing or reloading the panel.

Bulk actions

Select multiple items to access bulk operations including delete and tag updates.

Upload collections required

The Media Library page only appears when at least one collection has upload functionality enabled. If no upload-enabled collections exist, the page displays an empty state.

Responsive layout

The page adapts to different screen sizes with distinct layouts for mobile, tablet, and desktop viewports. The sidebar collapses on smaller screens.

Previous
Policy Helpers
Next
Webhooks