Media Gallery

Replaces the Payload media collection list view with justified, masonry, and grid layouts plus a lightbox.

Community 15 281/wk MIT v1.2.0

Installation

pnpm add @sitebytom/payload-media-gallery

About

This plugin swaps Payload's default media collection list for a gallery-style interface rendered through a custom admin view component. Registered via `admin.components.views.list.Component`, it replaces the standard table with toggleable Justified, Masonry, and Grid layouts while keeping the native List view as a fallback. It targets any collection you list in the `collections` option, which defaults to `media`. Each layout renders media cards with hover footers showing filenames and metadata. A lightbox viewer supports zoom, pan, keyboard navigation, and touch gestures, and plays back images, audio, and video inline. Quick edit opens Payload's native document drawer directly from a card, and bulk selection works with Cmd/Ctrl/Shift modifiers. When the target collection has `orderable: true`, cards can be rearranged by drag and drop; the plugin calls Payload's `/reorder` endpoint and updates the list optimistically. Options control the default view, which layouts are enabled and whether their footers appear on hover or always, plus toggles for the lightbox and quick edit. The chosen view persists per collection through Payload preferences. The plugin is marked experimental and maintained as a personal project: it only applies to the All Media view, not Folders, and is tested against Payload 3.73, Next.js 16, and React 19.

Package info

Package name
@sitebytom/payload-media-gallery
Latest version
1.2.0
Unpacked size
233 kB
License
MIT
Weekly downloads
281
Last publish
Feb 3, 2026

More from sitebytom

View profile

Similar plugins

More in Admin