sitebytom

payload media gallery

by sitebytom
Media & images
v3
^3.73.0

Overview

Summary generated from the README

Enhances the admin list view of media collections with justified, masonry, grid and the original list layouts. It adds a quick edit drawer, bulk selection with keyboard modifiers, and a lightbox for images, video and audio. It is configured through the plugins array and targets Payload 3.73 or later. It works in the All Media view but not in Folders.

Features

  • Toggle between justified, masonry, grid and list layouts
  • Quick edit through native Payload drawers
  • Bulk selection with Cmd, Ctrl or Shift click
  • Lightbox with zoom, pan, keyboard navigation and touch support
  • Image, audio and video playback with hover previews
  • Drag-and-drop ordering for orderable collections

Use cases

  • Browse a large media library visually in the admin panel instead of a plain table
  • Preview videos and audio files directly from the media collection view
  • Reorder media items by dragging cards in an orderable collection

From the author

A Payload CMS 3 plugin that enhances the Media List View with Grid, Masonry, and Lightbox views, including video previews.

Installation

npm i @sitebytom/payload-media-gallery

29

Stars

3

Forks

2

Open Issues

10 months ago

Last Updated

2.2k

Weekly Downloads

v1.2.0

npm Version

233.0 KB

Unpacked Size

4

Dependencies

GitHub stars

29+7 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 202629
Dec 4, 202629
Dec 3, 202629
Dec 2, 202629
Dec 1, 202629
Nov 30, 202629
Nov 29, 202629
Nov 28, 202629
Nov 27, 202629
Nov 26, 202629
Nov 25, 202629
Nov 24, 202629
Nov 23, 202629
Nov 22, 202629
Nov 21, 202629
Nov 20, 202629
Nov 19, 202629
Nov 18, 202629
Nov 17, 202629
Nov 16, 202629
Nov 15, 202629
Nov 14, 202629
Nov 13, 202629
Nov 12, 202629
Nov 11, 202629
Nov 10, 202628
Nov 9, 202628
Nov 8, 202628
Nov 7, 202628
Nov 6, 202628
Nov 5, 202628
Nov 4, 202627
Nov 3, 202626
Nov 2, 202626
Nov 1, 202626
Oct 31, 202626
Oct 30, 202626
Oct 29, 202626
Oct 28, 202626
Oct 27, 202626
Oct 26, 202626
Oct 25, 202626
Oct 24, 202626
Oct 23, 202626
Oct 22, 202626
Oct 21, 202626
Oct 20, 202626
Oct 19, 202626
Oct 18, 202626
Oct 17, 202626
Oct 16, 202626
Oct 15, 202626
Oct 14, 202626
Oct 13, 202626
Oct 12, 202626
Oct 11, 202625
Oct 10, 202625
Oct 9, 202624
Oct 8, 202624
Oct 7, 202624
Oct 6, 202624
Oct 5, 202624
Oct 4, 202624
Oct 3, 202624
Oct 2, 202624
Oct 1, 202624
Sep 30, 202624
Sep 29, 202624
Sep 28, 202624
Sep 27, 202624
Sep 26, 202624
Sep 25, 202623
Sep 24, 202623
Sep 23, 202623
Sep 22, 202623
Sep 21, 202623
Sep 20, 202623
Sep 19, 202623
Sep 18, 202623
Sep 17, 202623
Sep 16, 202623
Sep 15, 202623
Sep 14, 202623
Sep 13, 202623
Sep 12, 202623
Sep 11, 202623
Sep 10, 202622
Sep 9, 202622
Sep 8, 202622
Sep 7, 202622
Sep 6, 202622
npm weekly downloads

2.3K+2K since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 20262,280
Dec 4, 20262,117
Dec 3, 20261,789
Dec 2, 20261,278
Dec 1, 20261,184
Nov 30, 20261,168
Nov 29, 2026848
Nov 28, 2026536
Nov 27, 2026442
Nov 26, 2026325
Nov 25, 2026346
Nov 24, 2026334
Nov 23, 2026339
Nov 22, 2026420
Nov 21, 2026480
Nov 20, 2026508
Nov 19, 2026505
Nov 18, 2026486
Nov 17, 2026411
Nov 16, 2026413
Nov 15, 2026334
Nov 14, 2026323
Nov 13, 2026382
Nov 12, 2026496
Nov 11, 2026557
Nov 10, 2026651
Nov 9, 2026669
Nov 8, 2026693
Nov 7, 2026703
Nov 6, 2026684
Nov 5, 2026567
Nov 4, 2026523
Nov 3, 2026446
Nov 2, 2026478
Nov 1, 2026464
Oct 31, 2026433
Oct 30, 2026397
Oct 29, 2026356
Oct 28, 2026276
Oct 27, 2026289
Oct 26, 2026268
Oct 25, 2026264
Oct 24, 2026326
Oct 23, 2026265
Oct 22, 2026392
Oct 21, 2026478
Oct 20, 2026474
Oct 19, 2026517
Oct 18, 2026618
Oct 17, 2026609
Oct 16, 2026647
Oct 15, 2026592
Oct 14, 2026580
Oct 13, 2026595
Oct 12, 2026566
Oct 11, 2026423
Oct 10, 2026394
Oct 9, 2026405
Oct 8, 2026406
Oct 7, 2026391
Oct 6, 2026369
Oct 5, 2026330
Oct 4, 2026374
Oct 3, 2026359
Oct 2, 2026373
Oct 1, 2026372
Sep 30, 2026369
Sep 29, 2026363
Sep 28, 2026373
Sep 27, 2026353
Sep 26, 2026362
Sep 25, 2026385
Sep 24, 2026407
Sep 23, 2026447
Sep 22, 2026463
Sep 21, 2026470
Sep 20, 2026464
Sep 19, 2026407
Sep 18, 2026379
Sep 17, 2026374
Sep 16, 2026355
Sep 15, 2026341
Sep 14, 2026318
Sep 13, 2026318
Sep 12, 2026348
Sep 11, 2026334
Sep 10, 2026265
Sep 9, 2026253
Sep 8, 2026253
Sep 7, 2026252
Sep 6, 2026233

Each point is npm's rolling 7-day download count.

Health Score

48/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1142833666-root.svg)](https://payloaddirectory.dev/plugins/1142833666-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1142833666-root"><img src="https://payloaddirectory.dev/badge/1142833666-root.svg" alt="Payload Directory"></a>
Updated Feb 3, 2026Created Jan 26, 2026Published Feb 3, 2026

README

Payload Media Gallery

A Payload CMS 3 plugin that enhances the dashboard media collection view. It adds view toggles for justified and grid layouts while keeping the original list view. Features include quick edit drawer, bulk selection and a lightbox for images, video playback, and audio files.

Features

  • Layouts: Toggle between Justified, Grid, and List views.
  • Quick Edit via native Payload drawers.
  • Bulk Selection with keyboard modifiers (Cmd/Ctrl/Shift + Click).
  • Lightbox: Immersive viewer with zoom, pan, keyboard navigation, and touch support.
  • Rich Media: Supports images, audio, and video playback with hover previews.
  • Drag-and-drop ordering: Reorder items by dragging cards (set orderable: true in collection config).
  • Payload-Native UI that fits right into your dashboard.

Installation

pnpm add @sitebytom/payload-media-gallery

Usage

In your payload.config.ts:

import { buildConfig } from 'payload'
import { mediaGalleryPlugin } from '@sitebytom/payload-media-gallery'

export default buildConfig({
  // ...
  plugins: [
    mediaGalleryPlugin({
      collections: {
        media: true,
      },
      defaultView: 'justified', // 'justified' | 'masonry' | 'grid' | 'list'
      layouts: {
        justified: {
          enabled: true,
          footer: 'hover', // 'hover' | 'always'
        },
        masonry: {
          enabled: true,
          footer: 'hover', // 'hover' | 'always'
        },
        grid: {
          enabled: true,
          footer: 'hover', // 'hover' | 'always'
        },
      },
      lightbox: true,
      edit: true,
      disabled: false,
    }),
  ],
})

Options

OptionTypeDefaultDescription
collectionsstring[] | object['media']Collections to enable the gallery for.
defaultViewViewType'justified'The initial view mode if no preference exists.
layoutsobject{}Configure available layouts and their footer mode.
lightboxbooleantrueWhether to enable the lightbox gallery.
editbooleantrueWhether to enable the quick edit button.
disabledbooleanfalseWhether to disable the plugin.

⚠️ Experimental

An "as-is" personal concept for Payload CMS. Maintenance is not guaranteed.

  • Scope: Works in "All Media" view; unsupported in Folders.
  • Tested: Payload 3.73.0 | Next.js 16.1.4 | React 19.2.3

Similar plugins