PHPackages                             su-sws/stanford\_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. su-sws/stanford\_media

ActiveDrupal-custom-module[Image &amp; Media](/categories/media)

su-sws/stanford\_media
======================

Stanford Media module for Drupal 8 Media management

11.3.1(4mo ago)2158.6k↓43.4%310GPL-2.0-or-laterPHPPHP &gt;=8.1CI passing

Since Oct 30Pushed 4mo ago15 watchersCompare

[ Source](https://github.com/SU-SWS/stanford_media)[ Packagist](https://packagist.org/packages/su-sws/stanford_media)[ Docs](https://github.com/SU-SWS/stanford_media)[ RSS](/packages/su-sws-stanford-media/feed)WikiDiscussions 11.x Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (64)Used By (10)

[Stanford Media](https://github.com/SU-SWS/stanford_media)
==========================================================

[](#stanford-media)

##### Version: 8.x

[](#version-8x)

[![CircleCI](https://camo.githubusercontent.com/8cc9934c6b8b93ebe7b231fd94c57634f84740682a3861e3e95d2b1bfbff4ad6/68747470733a2f2f636972636c6563692e636f6d2f67682f53552d5357532f7374616e666f72645f6d656469612e7376673f7374796c653d737667)](https://circleci.com/gh/SU-SWS/stanford_media)

Maintainers: [pookmish](https://github.com/pookmish)

Changelog: [CHANGELOG.md](CHANGELOG.md)

Description
-----------

[](#description)

The Stanford Media module is used to enhance the Drupal 8 core media management. The enhancements are listed below. This has been confirmed to work with ckeditor.

### Field Formatters

[](#field-formatters)

In Drupal Core there is no way to select an image style on a media field. The provided field formatters pass in an image style or responsive image style into the display mode so that a desired image style is easier to display.

### Embed Alter Plugins

[](#embed-alter-plugins)

When an media entity is being embedded into a wysiwyg, the core media implementation does not provide the user with certain customizations. The plugins (found in `src/Plugin/MediaEmbedDialog`) target specific media types and adds necessary customizations and pre-rendering in order to obtain the desired outcome.

### Bulk Upload Page

[](#bulk-upload-page)

This uses the above Dropzone Upload plugin. It allows a user to drag and drop as many allowed files as they would like. It will then provide a form for each item to allow the user to customize image alt texts, item titles, etc.

### Media Duplicate Validation

[](#media-duplicate-validation)

To try to reduce the amount of duplicate images, the media duplicate validation will compare newly uploaded images and documents and compare them to existing items. If an item is similar enough, the user will be presented with the options to use an existing item, or continue to add the new item. Additional duplication plugins can be added when necessary.

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

[](#installation)

Install this module like any other module. [See Drupal Documentation](https://drupal.org/documentation/install/modules-themes/modules-8)If using this module on an existing site with media module previously enabled, it will over-ride existing media module configurations. Take extreme care if media entities already exist prior to this module.

When using composer to declare this as a dependency, custom modifications are needed for the dropzone library. Add or modify the root composer.json file. Below is a possible example of what to add for the dropzone library to be installed into the correct directory.

```
"extra": {
    "custom-installer": {
        "docroot/libraries/{$name}/": [
            "enyo/dropzone",
        ]
    }
}

```

When installing this module, it creates media entity types. One issue is when attempting to install the module on an install profile such as lightning or the standard install profiles. Each of these include media entity type configurations which conflict with the ones in this module. Extra steps are necessary if existing entity bundles already exist. One solution is to temporarily move all the config files in this module into the `config/optional` directory and then proceed with installation. This should create any missing media bundles and create the entity browsers that are included with this module. The reason for the conflicts is due to dependencies of other modules. Other modules and other config files can declare dependency on the configurations of this module. If all configurations of this module were placed in the `config/optional` directory, it would cause dependency issues during module/profile installation.

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

[](#configuration)

1. Add the Media Library button to the WYSIWYG as needed and check the box "Embed media".
2. If the WYSIWYG is configured to limit allowed HTML Tags, ensure the the below is added to the list of allowed tags: ``
    - Although `data-*` would allow all data attributes and you wouldn't need to add any others, the UI form validation will throw an error without the above attributes.
    - `data-caption` is only required if captions are allowed. This has to be added and `data-*` cant be relied on due to hard coded checking of the embed form.
    - `data-align` is only required if the media can be aligned. Similar issue as `data-align` above.

Troubleshooting
---------------

[](#troubleshooting)

If you are experiencing issues with this module try reverting the configuration files. If you are still experiencing issues try posting an issue on the GitHub issues page.

Developer
---------

[](#developer)

Development tools: To build and compile the CSS, Javascript, and Image assets required to make this theme great, you will need to have npm and nvm installed. Navigate to the root of the theme then.

Run:

```
nvm use
npm install

```

This project uses webpack to assemble the assets for this theme. To compile sass, javascript and push all assets in to place:

Run:

```
npm run publish

```

This script will compile all assets from `/src` into `/dist`.

Check out `package.json` for additional npm scripts and functionality.

Contribution / Collaboration
----------------------------

[](#contribution--collaboration)

You are welcome to contribute functionality, bug fixes, or documentation to this module. If you would like to suggest a fix or new functionality you may add a new issue to the GitHub issue queue or you may fork this repository and submit a pull request. For more help please see [GitHub's article on fork, branch, and pull requests](https://help.github.com/articles/using-pull-requests)

Releases
--------

[](#releases)

Steps to build a new release:

- Checkout the latest commit from the `8.x-2.x` branch.
- Create a new branch for the release.
- Commit any necessary changes to the release branch.
- Make a PR to merge your release branch into `master`
- Give the PR a semver-compliant label, e.g., (`patch`, `minor`, `major`)
- When the PR is merged to `master`, a new tag will be created automatically, bumping the version by the semver label.
- The github action is built from: [semver-release-action](https://github.com/K-Phoen/semver-release-action), and further documentation is available there.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity36

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.2% 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 ~37 days

Recently: every ~30 days

Total

62

Last Release

130d ago

Major Versions

8.x-dev → 9.0.02023-02-21

9.0.1 → 10.0.02023-09-08

9.x-dev → 10.1.02023-10-20

10.x-dev → 11.0.02024-01-08

PHP version history (2 changes)8.3.4PHP &gt;=8.0

9.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/680d4f5083667895b9323d1f792118734589007acc782a6e60e63d95f87d6081?d=identicon)[stanfordwebservices](/maintainers/stanfordwebservices)

---

Top Contributors

[![pookmish](https://avatars.githubusercontent.com/u/7185045?v=4)](https://github.com/pookmish "pookmish (208 commits)")[![imonroe](https://avatars.githubusercontent.com/u/1263892?v=4)](https://github.com/imonroe "imonroe (18 commits)")[![sherakama](https://avatars.githubusercontent.com/u/550602?v=4)](https://github.com/sherakama "sherakama (16 commits)")[![jbickar](https://avatars.githubusercontent.com/u/821106?v=4)](https://github.com/jbickar "jbickar (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![jenbreese](https://avatars.githubusercontent.com/u/1187335?v=4)](https://github.com/jenbreese "jenbreese (2 commits)")[![cienvaras](https://avatars.githubusercontent.com/u/3496574?v=4)](https://github.com/cienvaras "cienvaras (1 commits)")[![codechefmarc](https://avatars.githubusercontent.com/u/107938318?v=4)](https://github.com/codechefmarc "codechefmarc (1 commits)")

---

Tags

d8drupalmediamodule

### Embed Badge

![Health badge](/badges/su-sws-stanford-media/health.svg)

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

###  Alternatives

[thunder/thunder-distribution

The thunder distribution

50634.8k3](/packages/thunder-thunder-distribution)[drupalwxt/wxt

Project template for Drupal 10 sites built with the WxT distribution.

29159.8k8](/packages/drupalwxt-wxt)[voidagency/vactory_starter_kit

Vactory is a custom Drupal profile which is developed and released by VOID Agency.

1019.7k](/packages/voidagency-vactory-starter-kit)

PHPackages © 2026

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