Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Media Helper

Security covered Under active development 16 sites

This module helps you customize how media entities, like images and videos, are displayed on your site. It allows you to control image styles, add custom classes, and specify HTML attributes directly in field formatters or Twig templates, with automatic cache handling.

This module serves two main purposes:

  1. Making it easier to customize the output of image-based media entities via display formatter. The image style, custom classes, and other HTML attributes can be specified directly in a new formatter for media reference fields.
  2. Making it easier to output file-based media entities like image- and video- based media entities in Twig. The image style, custom classes, and other HTML attributes can be specified directly in Twig. Cache metadata for the media is handled automatically.

The `media_helper` service that powers the additional formatter and Twig functions provides public methods that can assist with programmatic rendering.

Drupal 10–11

Ask your assistant about Media Helper

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • file Drupal core
  • image Drupal core
  • media Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Mar 2023
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.3 Stable 10–11 Jun 26, 2026
2.0.2 Stable 9–11 Oct 21, 2024
2.0.1 Stable 9–11 PHP 8 May 28, 2024
2.0.0 Stable 9–10 PHP 8 Mar 20, 2023
2.0.x-dev Dev 10–11 Mar 20, 2023
1.0.0-rc1 Pre-release 9–10 PHP 8 Mar 13, 2023
1.0.x-dev Dev 9–10 PHP 8 Mar 6, 2023