Drupal 8 Media Handling: Easy Enough for Kittens

We’ve been spending some time with the recently-released Drupal 8 Beta, and have good news to report: Drupal 8 media handling tools don’t suck!

In the Drupal 5-7 era, one of the most common complaints from site content editors has been that it has really poor content and media handling capabilities out-of-the-box. Indeed, having to install and configure a WYSIWYG editor or media library as separate modules has been a pretty big issue for Drupal adoption as a blogging platform or news portal. Especially when competing CMSs like Wordpress have had this out-of-the-box since early releases, and actually, Wordpress’ content editing experience has become the standard for modern CMSs. Maybe that’s why so few blogs dedicated to pictures of kittens are powered by Drupal.

It has actually become a tradition to ask Dries Buytaert (Drupal’s creator) when Drupal will finally have the media library built in during almost every Q&A session at various DrupalCons.

Drupal’s media handling capabilities will improve dramatically with the release of Drupal 8. It will finally have the WYSIWYG editor “built-in” (the CKEditor was chosen as a standard, with the ability to swap it with other 3rd-party solutions).

In addition Drupal 8 finally includes a media “library” out of the box, that gives content editors some control over the files (images, documents, videos, etc) uploaded to Drupal. There is a Files dashboard now in the Content section of Drupal’s admin UI where you can see uploaded files and content entities where these files are used. There is finally out of the box integration of WYSIWYG and image insertion you don’t need to install extra modules to be able to upload an image while editing article text.

The Drupal 8 media handling experience is still not even close to as editor-friendly as a vanilla Wordpress install, but it’s a great step in right direction.

On the contributed modules front, the situation is even better now. While Drupal 8 media handling tools incorporate the minimal necessary content editing functionality out of the box, a site administrator can significantly enhance it using several modules that are the result of coordinated efforts by the Drupal community to unify media handling for Drupal 8. The Drupal 8 media initiative is to release a set of three modules that covers all of an editor’s needs for media handling: Media Entity, Media Embed and Media Browser.

  1. Media Entity is expected to provide the ability for site admins to define their own media types. Imagine, for example, that a Twitter Feed can also become a media item and can be configured and reused in multiple content entities.

  1. Entity Embed will provide a unified mechanism of inserting media items into content through WYSIWYG and render it using the desired display mode. A media item here can be entity of any type your Drupal install is aware of. Think of the possibility to insert a user profile into your blog post that will be updated automatically without the need to edit your content later. Or imagine embedding a teaser of a news article into the content of another page. And yes, you can embed a node into itself :)

  1. Entity Browser module will take care of providing a unified interface for choosing or managing the media items on your site. It doesn’t matter if you insert the media through WYSIWYG or as a separate content field. You will always see the same interface to select the media, including tabs to upload a new file, select from your personal library, or other sources you have access to. It goes without saying that Entity Browser will be configurable and extendable using all the flexibility Drupal has. This one is in the early stage of development yet, but should be available by the time Drupal 8 stable is released.

As you may have noticed, these 3 contributed modules are all operating with the term “Entity” rather than “File” or “Media” which means from a site editor/site builder perspective everything can be an entity or every entity becomes a piece of media  and this is the real power behind the upcoming release of Drupal 8.

Now maybe we’ll start to see more kitten photo-sharing blogs powered by Drupal. And the Drupal community will finally have to come up with a new question to pester Dries at Drupal events.

P.S. Big thanks to the guys behind the Drupal 8 contributed media modules. If you are interested in knowing how gears are running behind all the nice and clean media handling interfaces, take a look at this DrupalCon Amsterdam session, which was the inspiration for this blog post: https://amsterdam2014.drupal.org/session/drupal-8-media

[Photo Credit: www.christianholmer.com]