Overview: Media Content Management in Drupal 9
Drupal 9 opens up incredible opportunities for creating high-quality, engaging, and valuable websites. This system uses a large set of built-in tools and functions. Moreover, you can add additional modules and realize their full potential. However, such tasks require an appropriate set of tools and special capabilities.
An integral part of almost every web resource is media content. These are various images, videos, audio files, and much more. With the help of such elements, you can add colors and a special sound to your project. Today we learn how to manage media content. Drupal 9 opens up these opportunities for you with the help of the Media core.
Drupal Media Overview
The Drupal core, which received the logical name Media, is a set of functions that allow you to search, add, edit, customize, and delete different types of media data. It is an opportunity to use photos and images on the site, place documents, create an original slide show, and so on.
Initially, the Media module appeared in the core of Drupal 8.4, but it was presented as a hidden API at that time. Then, in Drupal 8.6, users saw the Media Library, which was considered only an experimental module. As the solution stabilized and improved, new functions began to be added. As a result, we saw the Media system directly in version 8.8. In fact, this is the modern version of the solution since the developers finally managed to complete the integration with the text editor. As the creator of the Drupal project himself noted, this function was the last step in the long-term transformation of media content management.
Media is a long-awaited improvement that has become a standard feature for the Drupal 9 system. Previously, you had to install additional modules to implement such functions and capabilities into the solution. But now, you get the necessary set of functions and capabilities directly in the core.
Media Types
If we talk about the out-of-the-box solution, then here on the "Structures" page, you can see 5 types of data at once that can be used thanks to the Media module:
- images;
- remote videos (from other web platforms, such as YouTube);
- documents, including PDF;
- video (local files);
- audio (local files).
- You can work with these types, as they are already pre-configured and ready to use.
- You can create a media entity using these solutions as a basis.
- You can also make changes to the built-in media, add fields, create new ones, etc.
It is essential to understand that all media types are responsible for working only with a certain type of asset. For example, Remote Video has a function to create a thumbnail of a video that you added from another site.
If you want to create a new type, you must select the appropriate content source using the media designer. For this, you can use both built-in and additional sources that you will receive using the corresponding modules.
How to Enable Modules?
This small step-by-step guide will be extremely useful if you are working with Drupal Media for the first time. The good news is that you do not have to download or install anything else. But remember that the modules are not included out of the box. Therefore, you will need to fix this and activate the corresponding tools.
To do this, open the admin panel and go to the Extend tab. This is where our modules are hidden. This completes the first step in preparing to work with Drupal Media.
How to Add New Items?
Use our tips if you need to add additional and new items to your media library. You need to go to the Content category from the admin panel and select the Media tab here. Click the appropriate button to add. After clicking, you will be automatically redirected to a new page where you can choose the media type that suits your requirements and tasks.
Now, you can click "Select file," which will allow you to upload the necessary image, video, or other content from your computer.
The next step is to fill in information about the items. Here, everything depends on the media and configuration features. If we are talking about images, you need to enter alternative text.
What Can You Do with Media Content in the Library?
When you have added the necessary items to the library, you can perform certain actions with them.
- View. You can view data using the grid or table view. When switching in this way, you do not have to worry about the settings and filters that you used earlier being lost;
- Search. You can also quickly find the files you need using the filter capabilities. You can search by language, status, name, and other parameters. By default, all files are sorted by the "newest first" principle;
- Editing, publishing, deleting. There is also a function to undo publishing. You can choose which action to apply when you click on the element field. After that, it is vital not to forget to click the "Apply" button.
Thanks to such functions, you can perform all the necessary actions with the content and make the required changes.
Adding Media to the Text Editor
Drupal 9 has a special feature that allows you to add a button to the text editor's toolbar to insert media content into the text quickly. But this button is not available out of the box for some reason. Therefore, you will have to add it yourself. It is easy.
Open the "Configuration" section and then go to the "Content creation" category. You will see "Text formats and editors" for the admin panel here. Click the "Configure" button and go to the "Toolbar configuration" section. Here you will find the corresponding icon, presented in the form of a photo and a musical note. You need to drag this button to the active toolbar. You can choose where exactly to place the new object on the panel.
On the same settings page, activate (turn on) the "Embed Media" filter. This filter is located at the bottom of the list. That's it. The button is now in a new place and ready for use. You can immediately add and edit media content when working with text as an editor.
The Library window opens after clicking on the button on the toolbar. Here, you can find the necessary data using the built-in filters. You can also continue uploading new files if required. When you find the object you need, check the corresponding box next to it, then click the "Insert Selected" button. This element immediately appears in your text editor.
If you need to make any changes, click the "Edit" button. This will open a new window where you can align the image, edit the text, add a caption to the photo, and more.
To Sum Up
The core in Drupal 9 for working with media files opens up great opportunities and offers many useful functions for creating higher-quality and more affluent websites. You can manage content, add different types of files, edit, and so on. Here, you can do literally everything that you consider necessary or required for your website to work.
Learning how to work with the Media Core independently is challenging. You can study step-by-step guides, watch helpful video tutorials, and much more to do this. If necessary, contact specialists who will help you understand the features of Drupal Media or perform all the required site settings based on your requirements and wishes.
Media content is significant for every modern website and web application. Therefore, Drupal in the new version allows you to add and manage such files without installing additional modules. Of course, you may need them to expand the system's functionality "out of the box" and add the necessary functions.
Comments