What is the External Media module?

External Media is a universal file picker module with support for Dropbox, Box, Google Drive, OneDrive, Instagram*, Unsplash*, AWS* or any remote URL* and many more and import them into Drupal.

Form Element

The new form element would allow you to add external services such as Google Drive, Dropbox, Box, OneDrive, AWS, Unsplash, Instagram, Pixabay, Pexels and other services, in addition to regular file choose field.

All with just adding External Media module as a dependency.

External Media form element

This is how it could be done in your custom forms:

'#type' => (\Drupal::moduleHandler()->moduleExists('external_media')) ? 'external_media' : 'managed_file',

If you would like to force your module to use External Media add dependency to the module's .info file:

dependencies:
  - drupal:external_media

Image and File fields

The module supports both File and Image field types and allows control of visibility of each plugin individually in addition to permissions. File extension and cardinality field settings are respected in popup widgets when supported.

External Media file and image fields.

* - available in the Premium version of the module.

Third-party contrib modules

Project information

Releases