8 Days To Drupal 8 | Day 1: Media Management In Drupal 8
We're counting down the days to the official SooperThemes Drupal 8 Release! Count with us as we will be writing a Drupal 8 related blog post every day for the next 8 days.
Media management is one of the areas where Drupal was lagging compared to competing systems, like WordPress. In Drupal 8 Media management has improved greatly! With the Entity Browser you can create highly customized user experiences to manage your creative assets. In the early times of Drupal 8 it was difficult to set up the Entity Browser but in the meanwhile turn-key solutions have become available that do the tedious configuration work for you.
Entity Browser Meet File Entity Browser
If you're using SooperThemes Drupal themes you have the option to use our demo content installation profiles. This is a real time-saver because the demo profiles do not only contain demo content; they come with a complete configuration of all the Drupal features you need. We chose to include the File Entity Browser in Glazed CMS for it's beautiful masonry grid and extended features. This module configures and extends the Entity Browser modules with media library views, mass upload with drag and drop support, and a useful image-preview feature that lets you check the quality your assets while browsing the library.
view on sooperthemes.com if you can't see the video
The preview tool even has an option to preview images in all your image styles, allowing you to decide the right compression/quality trade-off for your creatives!
Media Management In Glazed Builder 8.x
In Drupal 7 our Glazed Builder Drupal page builder module integrates with the Media module. The Media module integrates seamlessly with Glazed Builder, offering all creative assets in Glazed Builder that you have uploaded elsewhere in your Drupal site. Of course any images you upload in the Glazed Builder interface are also available in the media library elsewhere in your Drupal site.
We achieved the same feat in Drupal 8. Getting there was not easy: the Media module in Drupal 7 offered an API to integrate media library in your frontend application but there is no such API in Entity Browser.
Of course we don't let that stop us from building exactly what we want, and we achieved the same seamless integration with Entity Browser that we have with the Media module.
SooperThemes Open Source Contributions For Entity Browser
In order to get the media management experience up to our standards we made some improvements to the experience and functionality. We contributed several patches to Entity Browser and File Entity Browser.
Supporting field cardinality in File Entity Browser and visual cues for media selection limits
Out of the box Entity Browser does not limit the number of files you can select based on field cardinality. On a single-image field you can select more than one image. Our patch doesn't just limit the number of files you can select based on the field settings but also adds a layer of visual cues that let the user know when he cannot select more images. The patch is unfortunately not committed at the time of writing this blog because there is uncertainty about whether this functionlity beling in Entity Browser core or in the File Entity Browser add-on module.
Check out this video to see how the patched version of File Entity Browser handles fields with unlimited, multi-value, and single-value cardinality: