# `media_variants`

**Module:** Media

---

## Purpose

Processed image variants for each uploaded media file. Multiple variants (thumbnail, display, full_width, gallery) are generated per upload.

---

## Columns (Summary)

| Column | Notes |
|--------|-------|
| `id BIGINT UNSIGNED AUTO_INCREMENT PK` | — |
| `media_file_id BIGINT UNSIGNED NOT NULL FK→media_files` | — |
| `variant_type VARCHAR(20) NOT NULL (thumbnail|display|full_width|gallery)` | — |
| `storage_path VARCHAR(1000) NOT NULL` | — |
| `width SMALLINT UNSIGNED NULL` | — |
| `height SMALLINT UNSIGNED NULL` | — |
| `file_size INT UNSIGNED DEFAULT 0` | — |
| `format VARCHAR(10) NOT NULL (webp|jpeg|png)` | — |
| `created_at DATETIME DEFAULT CURRENT_TIMESTAMP` | — |

---

## Referenced By

None

---

## Notes

See `docs/database/RELATIONSHIP.md` for full entity relationships and `database/schema.sql` for authoritative DDL.
