WebsiteSupport.io
Drupal Edition
MediaUXContent editingAdministration

Media Library Modal Dimensions

The Drupal Media Library modal opens at the same size regardless of what it contains. This module adds per-field width and height settings so image galleries, video browsers, and document pickers can each have appropriately-sized modals — no JavaScript required.

12 April 2026·Drupal ^10 || ^11

Media Library Modal Dimensions solves a layout problem that becomes noticeable on sites with varied media types. The core Media Library widget opens its picker modal at a fixed size, which works adequately for a generic image browser but feels cramped for a video library or unnecessarily large for a simple document picker.

This module exposes width and height settings directly in Drupal core's existing widget settings UI — there are no new admin pages, custom routes, or permissions to manage. Each field gets its own modal size configuration, accepting percentages, pixel values (integer or decimal), and auto.

The implementation uses a forward-compatible wrapper pattern designed to survive expected future refactors of MediaLibraryWidget in Drupal core (tracked in core issue #3127867). The module works with any field on any entity type that uses the Media Library widget.

There are no additional dependencies beyond Drupal core. The module is not yet covered by the security advisory policy but is well-scoped, low-risk, and addresses a genuine usability gap that content teams encounter whenever a site uses the Media Library with diverse media types.

Let’s talk

Ready to stop worrying
about your Drupal site?

Start with a free audit — no commitment, no jargon. Our engineers will review your site and send you a plain-English report within 48 hours.

View Plans

0207 490 2311 · hello@websitesupport.io