Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Media External

478 sites No security coverage
View on drupal.org

This module allows you to import images from external sources like Pexels and Unsplash directly into your Drupal media library. You can configure API keys and create new media types that pull content from these external providers, making it easy to manage and use external media assets locally.

This module provides a new media source that can be used to import external media as local media items using the media library. External sources for images can be added using plugins. The module ships with plugins for the open source image libraries Pexels and Unsplash.

Using the module

  • Configure the API keys for Pexels and/or Unsplash using settings.local.php.
    $settings['media.external_provider.unsplash.access_key'] = 'YOUR_UNSPLASH_ACCESS_KEY';
    $settings['media.external_provider.pexels.api_key'] = 'YOUR_PEXELS_API_KEY';
    
  • Create a new media type choosing "External media" as the source.
  • In the source configuration, select the provider plugin you want to use for the media type.
  • Save the media type, the source field that stores the external media ID will automatically be created.
  • To improve performance, it is recommended to create extra custom fields to store API data.
    • Go to the "Manage fields" page and create a separate text field to store the image URL.
    • Go to the "Manage fields" page and create a separate text field to store the image alt text.
    • Edit the media type and map the "File URL" and "Alt text" field to the created custom fields.
    • Since the custom fields are now automatically filled when media items are created, it is fine to remove them from the different form displays. The alt text can still be shown if editors prefer to override the alt texts provides by the external media provider.
    • Using the imagecache_external module, you can apply an image style to the custom text field containing the mapped image URL.

Activity

Total releases
1
First release
Dec 2025
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0-beta2 Pre-release Dec 23, 2025