# Media Gallery

> Multi-image gallery field for EmDash CMS with drag-to-reorder, metadata, and search.

Source: https://emdashcmseverything.com/plugins/media-gallery/

- Category: Content
- Status: available
- Version: 0.3.0
- Price: Unknown
- Compatibility: emdash >= 0.14.0
- License: MIT
- Maintainer: Georgi Georgiev
- Download: https://www.npmjs.com/package/emdash-plugin-media-gallery
- Repository: https://github.com/gg3orgiev/emdash-plugin-media-gallery
- Published: 2026-06-01

A multi-image gallery field for EmDash CMS: ordered media arrays with per-item metadata, a primary flag, and media search. Also provides a single-image picker widget replacement.

## Installation

```bash
npm install emdash-plugin-media-gallery
```

```typescript
import { mediaGalleryPlugin } from "emdash-plugin-media-gallery";

emdash({
  plugins: [mediaGalleryPlugin()],
});
```

## Configuration Options

| Option | Type | Default | Purpose |
|---|---|---|---|
| `maxItems` | number | 20 | Maximum images (hard cap: 200) |
| `minItems` | number | 0 | Minimum images required |
| `allowedMimeTypes` | string[] | common image types | MIME filter |
| `perItemFields` | string[] | `[]` | Per-item metadata fields |
| `searchEndpoint` | string | (none) | Host search endpoint URL |

## Features

- Gallery and single-image widgets
- Drag-to-reorder
- Set-as-primary flag
- Multi-add picker with per-item alt-text inputs
- Inline validation feedback
- Server-side validation
- Storefront hydration

## Requirements

- EmDash `>= 0.14.0`
