PHPackages                             pubvana/media - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. pubvana/media

ActiveFlightphp-plugin[Image &amp; Media](/categories/media)

pubvana/media
=============

Media management module for Pubvana — images, video, embeds

0.2.1(2mo ago)031MITPHPPHP ^8.1

Since Apr 25Pushed 2mo agoCompare

[ Source](https://github.com/Pubvana-CMS/media)[ Packagist](https://packagist.org/packages/pubvana/media)[ RSS](/packages/pubvana-media/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (4)Versions (8)Used By (1)

[![Stable? Not Quite Yet](https://camo.githubusercontent.com/8712c441bb32fd8db507e0008c5d13e30def50064f8fcbc689fbcf5191f7d2af/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652533462d6e6f7425323071756974652532307965742d626c75653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/media)[![License](https://camo.githubusercontent.com/078dde81bc0dfbb8624664d8ebdadd5a4cd453240e70017ebb8c4ba2168cd2ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70756276616e612f6d656469613f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/media)[![PHP Version](https://camo.githubusercontent.com/deb9e05e4c7f4f4b03ac2aa94152825d2bb563bea047c56f68321fe0294e370e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70756276616e612f6d656469613f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/media)[![Monthly Downloads](https://camo.githubusercontent.com/43cc59c724014e25362af801a048f463c52f3950b144b854739805b33f9f547e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f70756276616e612f6d656469613f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/media)[![Total Downloads](https://camo.githubusercontent.com/2529f8cd9171a6280be193649f6ab8b3c77c4992b51d6456b26e9177d0119da7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70756276616e612f6d656469613f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/media)[![GitHub Issues](https://camo.githubusercontent.com/6b431eea01a56a5d00ab356e2fd78e89b872a716f24317049c1b9d6cf002c922/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f50756276616e612d434d532f6d656469613f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/media/issues)[![Contributors](https://camo.githubusercontent.com/0a374360b55fc66ac56a4636decdfd7fec6fc17aefddb70e4cd54316991b4494/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f50756276616e612d434d532f6d656469613f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/media/graphs/contributors)[![Latest Release](https://camo.githubusercontent.com/ef5306a9a789b598ce3fdcce2b69ea027e7b0c2a882d91204dbfa09a410111f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f50756276616e612d434d532f6d656469613f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/media/releases)[![Contributions Welcome](https://camo.githubusercontent.com/9db3f8b82ea88469efd296a9305fc00f40b4c9450bb6b539d42d339fa6963444/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d626c75653f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/media/pulls)

Pubvana Media
=============

[](#pubvana-media)

**I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.**

Media management module for [Pubvana](https://pubvanacms.com) — images, video, and embeds. Built as a [Flight School](https://github.com/enlivenapp/flight-school) plugin.

Features
--------

[](#features)

- Image uploads with automatic WebP derivatives (medium + thumbnail)
- Video uploads with optional ffmpeg poster extraction
- Embed storage (YouTube, Vimeo)
- Imagick or GD — auto-detects the best available processor
- Reusable media picker widget for any form
- Media service on `$app->media()` — usable from any controller or plugin
- Registers an `adext` menu contribution when admin is present

Requirements
------------

[](#requirements)

- PHP 8.1+
- `enlivenapp/flight-school`
- `enlivenapp/flight-shield`
- `enlivenapp/migrations`
- `flightphp/active-record`
- Imagick or GD extension
- ffmpeg *(optional, for video poster extraction)*

Recommends
----------

[](#recommends)

- `pubvana/admin` (Admin UI for the media library and picker workflows)

Installation
------------

[](#installation)

```
composer require pubvana/media
```

Enable in `app/config/config.php`:

```
'plugins' => [
    'pubvana/media' => [
        'enabled'  => true,
        'priority' => 60,
    ],
],
```

Migrations package creates the `media` table automatically on first load.

Flight School config
--------------------

[](#flight-school-config)

This package uses Flight School's return-array config format. `src/Config/Config.php` returns the package defaults as an array, and Flight School stores that array under `pubvana.media` on `$app`.

That returned array currently includes `'routePrepend' => 'media'`. The package does not currently define public application routes in `src/Config/Routes.php`, but admin/media-related routes still use the normal Flight School loading flow.

Configuration
-------------

[](#configuration)

Defaults from `Config.php` — override in your plugin config block:

KeyDefaultDescription`upload_path``'uploads'`Relative to public/`max_image_size``10485760`10 MB`max_video_size``104857600`100 MB`allowed_image_ext``['jpg','jpeg','png','gif','webp']``allowed_video_ext``['mp4','webm','mov']``webp_quality``85`WebP output quality (0-100)`thumb_width``300`Small derivative width (proportional resize)`thumb_height``200`Reserved for poster sizing / legacy config compatibility`medium_width``768`Medium resize width (proportional)Usage
-----

[](#usage)

```
$media = Flight::media();

// Upload an image
$record = $media->uploadImage($_FILES['photo'], user_id());

// Upload a video
$record = $media->uploadVideo($_FILES['clip'], user_id());

// Store an embed
$record = $media->storeEmbed('https://youtube.com/watch?v=...', user_id());

// List with pagination
$result = $media->list(page: 1, perPage: 24, type: 'image');
// $result = ['items' => [...], 'total' => 42, 'page' => 1, 'per_page' => 24]

// Find / update / delete
$record = $media->find(5);
$media->updateMeta(5, ['alt_text' => 'Sunset photo']);
$media->delete(5); // removes DB record + all files
```

### Picker widget

[](#picker-widget)

Embed the media picker in any form:

```

```

Renders a clickable thumbnail with an offcanvas browser. The selected image path is written to a hidden input with the given name.

File structure
--------------

[](#file-structure)

Uploads go to `public/{upload_path}/YYYY/MM/`:

```
uploads/2026/04/
    abc123.jpg          # original
    medium/abc123.webp  # 768px wide, proportional
    thumbs/abc123.webp  # 300px wide, proportional

```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance84

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

7

Last Release

80d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3036663?v=4)[Mike W](/maintainers/enlivenapp)[@enlivenapp](https://github.com/enlivenapp)

---

Top Contributors

[![enlivenapp](https://avatars.githubusercontent.com/u/3036663?v=4)](https://github.com/enlivenapp "enlivenapp (8 commits)")

### Embed Badge

![Health badge](/badges/pubvana-media/health.svg)

```
[![Health](https://phpackages.com/badges/pubvana-media/health.svg)](https://phpackages.com/packages/pubvana-media)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

12653.6k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
