Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Media Entity Twig

Security covered Under active development 1 sites

This module allows you to use Twig templates as media items within Drupal. This enables you to reuse custom-built interactive components as media, similar to how you would use images or videos, making them available anywhere media can be placed on your site.

The Media Entity Twig module provides a powerful way to add Twig templates, content and components as media items that can be re-used anywhere you can add media.

This can be useful if you've built interactive components that you want to feature instead of more traditional media such as images and video.

This module is designed for Drupal 10.3+ and is ideal for theme developers, frontend engineers, site builders and anyone needing to add twig things to be used and reused as media items.

Usage:

  1. Require the module into your project via Composer: composer require drupal/media_entity_twig.
  2. Enable the module in the UI: /admin/modules#module-media-entity-twig or via drush: drush en media_entity_twig
  3. Go to media types /admin/structure/media and you will see a new media type called Twig.
  4. A default twig field is automatically added with default field settings. You can now customise or add additional fields at /admin/structure/media/manage/twig/fields
  5. You can now add media of type twig in addition to the default media types such as image and video.

Additional Requirements

This module requires Drupal's core image, media, media_library, and path modules as well as the contrib module twig_field.

Community Documentation

I will provide a YouTube walkthrough of the functionality this module provides soon!

Supporting organisation

Pivale are a globally trusted web development company who build Drupal CMS websites and software.

Drupal 10–11

Ask your assistant about Media Entity Twig

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

  • twig_field
  • image Drupal core
  • media Drupal core
  • media_library Drupal core
  • path Drupal core
  • system Drupal core >=10.3

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 Jun 9, 2025
1.0.0-beta2 Pre-release 10–11 May 30, 2025
1.0.0-beta1 Pre-release 10–11 May 30, 2025
1.0.0-alpha2 Pre-release 10–11 May 28, 2025
1.0.x-dev Dev 10–11 May 28, 2025
1.0.0-alpha1 Pre-release 11 May 28, 2025