Disclaimer: This post ended up being quite long and I apologize for that. Media is a complex problem and there is a lot to be said. If you have better things to do in your life skip directly to the most important part: list of modules in D8 media space and their status. Would you like to help? See what is our current focus. Would you like to get in touch? We will be happy to talk to you!
OK. Now we're ready to start!
With Drupal 8 around the corner a lot of people started asking me when will media be ready. It was quite reasonable to expect this to start happening. Unfortunately there is no simple answer to this question. Shortest would be: "It depends.... What exactly do you need?". I know what you're thinking now... "Are you joking with me!?"
First things first
Quite some things happened since Drupal 8 release cycle started. Initially we focused on improving core itself. Improvements that were added to core are not many, but some of them are still very nice. Most noticeable for a day to day user are WYSIWYG embedding of images, multi-upload with drag'n drop support and listing of files in the system.
Good stuff, you have to admit that. :) I hope that you already feel better... While those won't cover every possible use case are still nice improvements that most of sites will leverage from.
At some point during the D8 cycle it became clear that we won't be able to include any more major improvements in core. It was necessary to start thinking about contrib space. Discussions were started. We tried to identify what went wrong in the past and proposed ideas to make things better.
At NYCCamp 2014 we finally met in person and came with an ambitious plan. A lot of work was invested into it since then. We had two successful Google Summer of code projects, many volunteers invested 100s of hours and many companies invested significant funds to reach our goal.
Where are we going?
Most important decision that was made in New York is division of media ecosystem into smaller and independent components. Until now media solutions mostly came as full-featured solutions that were hard to maintain and almost completely unable to integrate and collaborate. This approach comes with many benefits. Let's list just few of them:
- Smaller pieces are easier to maintain.
- Independent components with clear focus are useful even outside of media.
- Components can be shared among many media solutions which simplifies development and maintenance.
- Media can re-use components that might already exist in the community.
I often use Drupal Commerce ecosystem as an example. Instead of going down the "one big module that does all and even more" its architects decided to divide the problem space into many smaller pieces. As a result of that we have core commerce module that builds foundation and many plugins that build on top of that. Every e-commerce site is different and this approach allows us to adjust each individual site to the client's needs.
"But, everything that shines ain't gold...", you say. "If you divide the ecosystem into many parts, how will I know where to look for things?"
You are right. Fragmentation does indeed come with some level of complexity. But we think that this can be fixed. I'll give commerce example once again. "Ah! Not again!", you say. Well... yes. Those guys did many things right! Anyone heard about Commerce Kickstart? No? It is a Drupal distribution for e-commerce. It bundles Commerce core and many of it's plugins to build a full-featured solution. It can be used as a plug'n play solution, foundation to start building a project on or as a demonstration of possibilities that Commerce ecosystem has to offer.
Our plan is to offer something similar. Either a distribution or a few "full-featured solution" modules that will bundle components and come with some default functionality. Those solutions will serve similar purpose than Kickstart.
Did you really make it this far?! You must be insane! :) Now you really deserve some really useful info...
Where are we?
OK... There will be many components. But is there anything ready at all? There is. Not everything, but there are pieces you can start using today.
- File entity: you might be familiar with this module from Drupal 7. It improves core files, makes them fieldable, lets you configure how they're displayed, etc. There is no official port yet, but you can check the unofficial one that lives on GitHub. It will hopefully become official soon (/me looks at maintainers :)).
Media entity handling Tweets and their metadata.
Media entity: this alternative media storage approach doesn't directly extend core files. Instead of that creates new entity type from scratch. It uses unchanged core files for local media and handles remote media (Youtube, Twitter, Instagram, ...) differently. It knows how to handle each individual type of media and it able to map metadata (tags, captions, credit info, thumbnails, ...) with entity fields.
- Entity browser: our browsing and selecting tool. Again, it knows how to work with any entity type. You can use it with entity reference fields, in your custom forms, as a standalone tool and we're planning to integrate it with Entity embed. Entity browser is extremely flexible. It comes with many default plugins and you can write your own. It is still in quite heavy development but some people use it already. There is also some basic documentation in our D8 media guide.
Media embed in action.
Entity embed: embedding solution that can swallow any entity that you throw at it. It is very flexible and powerful. It is able to track embedded entities and can modify appearance on the render time. It integrates with CKEditor which gives users a nice UI to select entities to embed and configure their display. This will create a custom HTML element with data attributes that define all configuration. This configuration is picked by the text filter on the display time and converted to a rendered version of the entity. Very mature and useful. You should really give it a try!
Entity browser with DropzoneJS image uploader and image library.
DropzoneJS: this module provides Drupal integration for the great multi-upload library. It gives you form element that can be used on custom forms and uses it to provide a widget for Entity browser. File/image field widget is still in development.
- Crop API: provides storage for all cropping solution. Is able to handle crops based on region and focal point concepts. Also comes with some very basic image effects.
- Image widget crop: first UI module that builds on top of Crop API. Brings nice cropping experience to core image fields.
Entity browser and Inline entity form working together.
Inline entity form: born in Drupal Commerce world quickly became standard tool for advanced manipulation of referenced entities. It turns out it works great with media too!
- Fallback formatter: provides a field formatter that can attempt multiple formatters and the first one that returns output wins.
- File entity browser: one of the first "example" modules. Uses Entity browser to provide nice multi-upload experience and ability to reuse files from the library. Uses Masonry grid layout library to make things look nice. Can be used as a starting point if you want to start exploring Entity browser. More features will be added soon.
- Media pinkeye: another "example" module. Comes with some default configuration that displays what can be done with Media entity and its plugins.
As you can see there is a lot of pieces that you can start using today. Are full-featured modules like Media, Scald and MediaBox ready? No. Are you able to start building good stuff today? Definitely! Those modules will be using same components as I listed above. Can you expect issues and bugs? Yes! Get in touch and we'll fix stuff together.
What remains to be done?
A lot! :) We consistently tag all our issues with "Media Initiative" and "D8Media". Search for this two tags and you'll get the list of issues we need to solve at some point. Additionally we add "Novice" tag to indicate issues that are suitable for new contributors.
We also maintain roadmaps for some of the individual modules:
- Media entity: https://www.drupal.org/node/2577453
- Entity browser: https://www.drupal.org/node/2576683
- Inline entity form: https://www.drupal.org/node/2576445
Check those for the current focus.
How to help?
Start contributing. You can write documentation, test modules in the ecosystem and report bugs, fixing bugs or work on new features, design UX, write automated tests, share ideas and much, much more. You have a skill, we have a task for you.
We are sprinting too. Join us on one of the sprints in the near future:
- 2nd Drupal 8 media virtual sprint (13. November 2015)
- Sprint at DrupalCamp Vienna (29. November 2015)
- Week long media sprint in Zurich - part of the broader D8 Media initiative program started by MD Systems (30. November - 4. December 2015)
I want to start building D8 site and I need media. What to do?
There are several things you can do:
- Check components that we already have and see if you can use them to build what you want.
- Encourage your team to get involved with the initiative and help us pushing media forward.
- Don't start building your own custom solution. Please. Even if it sounds like a good idea it is not. Believe me. This is never a good idea. You will have problems maintaining your custom solution. Invest time in common efforts. You will get what you need and community will help you maintaining it. We don't provide solutions for your problems? Talk to us! We will listen. I promise! Read this paragraph again.
- You don't have in-house knowledge/skills? You have the team that needs just a bit of guidance? We can provide some level of commercial support, coaching and consulting. Get in touch and we'll see what can be done.
Our goal is to make Drupal the best media handling solution for the internet. As you can see there's still a long way to reach that. However, we have a plan and we're working heavily. Some things are there and you can start using them today.
Are you missing something? Join us. Only together we'll make Drupal media shine. Share this post with a co-worker or friend. Let us know what you think. Get involved and help us reach our goal.
I would like to thank the people who preliminary reviewed this post and suggested improvements (in random order): my wife Nataša, Károly Négyesi (@chx), Primož Hmeljak (@Primsi), Tadej Baša (@paranojik), Miro Dietiker and Sascha Grossenbacher (@berdir). I would also like to thank everybody that contributed to the initiative in past years.