Remotely browsing media in Drupal 8
Drupal Media ecosystem is in full bloom in Drupal 8 land. It consists of many modules but Entity Browser could be considered a central piece of this modular system. It functions as a hub between the media item and the content where editors want to place it.
By default, Entity Browser lets us upload and list locally available media. But what if we want to get media from somewhere else? Like Getty images, Flickr or some DAM (Digital Asset Management) system. Entity Browser makes our lives easier here, allowing for seamless integration with their APIs.
Adding Elvis DAM as a new media source
We just completed the integrating Woodwing Elvis DAM using this approach. The result of those efforts was Elvis Media a module that integrates with Entity Browser, Media entity and both NP8 and Thunder installation profiles. The module allows users to search through the Woodwing Elvis catalog using the same UI used for local files. At the same time it provides site administrators an out of the box integration solution that doesn’t need complex configuration.
The project - supported by A&F and Somedia Publishing - was divided in two major tasks: developing logic that communicates with Woodwing Elvis REST services and implement the widget for Entity Browser.
When the search service returns the asset with the results, we list them in a grid view. Because the project was part of the NP8 efforts we wanted to give the widget a familiar look, so we implemented a similar UI as the one provided by file_browser (namely used Masonry and styled the thumbnails accordingly).
Further workflow steps are standard Entity Browser: select the media items and send them to the host entity. After the selection was done and the form submitted the widget fetches the original images and saves them as local media. Metadata fields are populated using metadata fetched alongside the media items. Furthermore in the case of Media entity integration it is possible to map remote metadata to local fields, The same functionality is available in code for file entity integration.
The initial implementation offers some basic library search capabilities - keyword search and folder tree browsing. Elvis DAM additionally provides other powerful search features like facets (by using Lucene as it search engine) through the API, which could be implemented in further iterations of the module.
Integrate your service
With the increasing volume of digital assets companies have to manage, centralized DAM systems are becoming more and more common. As one of the leading companies in the Drupal 8 media ecosystem, MD Systems is able to deliver quality assured best-of-breed integration.