Sanjay Mogra's First Drupal Module to Improve Media Display in Views

Sanjay Mogra Releases First Drupal Module to Improve Media Display in Views

Sanjay Mogra has released his first contributed module on Drupal.org, offering a new solution for presenting media content in Drupal Views. The module, Media Field Gallery, provides a responsive, gallery-style layout for displaying images, videos, audio files and documents—without requiring any custom code.

The module addresses a gap in Drupal’s core functionality. While Drupal supports media well at the data level, it does not offer a built-in way to display different media types together in an organized, visual format. Media Field Gallery fills that gap by turning standard media reference fields into interactive previews, enhancing user experience across content-driven websites.

Once installed, the module allows site builders to configure gallery behavior through an admin interface. Users can apply the layout globally or target specific Views paths. The display includes lightbox-style previews, inline media rendering, and a "+X more" overlay that appears when more than four media items are present. It supports common file types including images, video, audio, PDFs and Word documents.

To use the module, content types must include a media reference field (Entity Reference → Media). The configuration is handled entirely through the UI, with no changes needed to existing Views or custom code, making it accessible for both developers and non-developers.

Mogra, a senior engineer at Acquia and Acquia Certified Developer (Drupal 11), created the module as part of his effort to give back to the open source community. He is inviting feedback, suggestions, and contributions from the Drupal ecosystem.

Media Field Gallery is in its early release phase, with version 1.0.0 made available on August 2, 2025. It currently supports Drupal 9, 10 and 11. The module is not covered under Drupal’s official security advisory policy, and users are encouraged to evaluate it accordingly.

More details and downloads are available at drupal.org/project/mediafield_gallery.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related People

Upcoming Events

Latest Opportunities