Automatically creates and synchronizes Drupal media entities from remote data exposed through the External Entities module. Each enabled external entity type gets its own media type, populated via a Drush command — no custom code required.
Features
- Automatically creates a dedicated media type for each external entity type when synchronization is enabled.
- Drush command to create, update, and clean up media entities in bulk. Supports filtering by entity type or by specific remote IDs.
- Configurable behavior when a remote entity disappears: do nothing, unpublish, or delete the corresponding media.
- Each media entity is only an entity reference to the external entity.
- Downloads and caches remote thumbnail images locally from a configurable Drupal field (e.g. field_image_url).
- One-click batch deletion of all media entities linked to an external entity type, with confirmation step.
Post-Installation
- 1. Go to Administration > Structure > External Entity Types.
- 2. Edit an existing external entity type.
- 3. Open the Media synchronization tab.
- 4. Check Enable media synchronization, set the thumbnail field machine name (e.g. field_image_url) and choose the missing-entity behavior.
- 5. Save, a media type is created automatically.
- 6. Run drush xnttms to populate media entities from the remote source.
Drush commands
external-entities:media-sync
Create or update media entities that reference the remote external entity.
drush xntt:ms
drush xntt:ms publications,exhibitions
drush xntt:ms publications --ids=123,456
Additional Requirements
- External Entities (https://www.drupal.org/project/external_entities)
- Drupal core Media module
Supporting organizations:
coding and sponsoring
Project information
- Project categories: Decoupled, Import and export, Media
- Ecosystem: External Entities
- Created by nicoloye on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
