Using the Media Library in Drupal

Media Library Overview

Media Library is a media management tool that enables you to find media that exists within your Drupal site and to add new media items. It allows you to search, sort, and import a variety of media types with an easy-to-use interface.

The media types that are usually available to import are as follows: 

  • File: txt, doc, docx, pdf, xlsx, zip 
  • Image: png, gif, jpg, jpeg 
  • Video File: can be imported from YouTube or Vimeo 

Parts of the Drupal Media Library

Drupal’s Add or select dialog has 6 key features for inserting listed media, interface details follow.
Media Library user interface
  1. The media library is divided up by media type, and the menu item filter items in the library by type. Which media types, and therefore which menu tabs that display, can vary depending on individual site configuration.
  2. If you have appropriate permissions, the Add File section allows you to add media items to the media library (it does not display if you do not have the appropriate permissions). Available field(s) can vary by media type and by site configuration.
  3. The Name and Sort By field allows you to search for specific media items in the library or apply various filters to the available items. 
  4. The media library can be displayed in two ways: as a grid or as a table. These links allow you to switch between the two layouts. Any selections you make in the grid layout will be remembered in the table layout, and vice versa.
  5. The Media Library displays the current set of media items available to you, with filters and/or search terms applied. You can click the "Insert selected" button and add the selected items to a field or text editor.
  6. The Item Counter displays how many items are in the library and keeps track of how many media items you have selected so far, across all types. For example, the counter will simply say something like "1 of 1 item selected".

Accessing the Media Library

You can access the media library two ways: 

  1. Using the admin menu: select Content > Media > Add media 
  2. Clicking the "Insert from media library" button, indicated by the Media Library icon in the WYSIWYG content editor. (The icon resembles a photograph connected to a musical note.
    Media Library icon depicting a photo and a musical note.
     

You will first need to be logged into your website. For example to log in on this site, you would type in designsystem.wwu.edu/user

Adding media to the library using the menu

  1. Add media to the library by using the Administration menu at the very top of the page, go to Content > Media > Add Media.
  2. Choose the type of media you want to add.
  3. Add the file to the Media Library. (Choose the file using the file browser and upload. Your file must be of one of the allowed types. If you need to upload a file that does not have one of these file extensions, contact a site administrator to find out if your extension can be securely added.) 
  4. When you add media to the library, you will see a form to fill out additional information. The specific information needed varies by site configuration and by the type of media you're adding. For Documents and Images, you will at least need to fill out any required fields associated with that media type. Images require alternative text for screen readers. Some media types such as Videos don't require any additional information. However you can only add videos that are currently hosted on the supported platforms, YouTube and Vimeo.
  5. Navigate to the page you want to place the media item and click the "Insert from media library" button, indicated by the media library icon.
  6. Choose the file you just added (it should be at the top). When selected, the screen will display 1 of 1 item selected.
  7. Insert the selected item.

Adding/selecting media while editing content

  1.  While in the Content Editor of your Drupal website, click the "Insert from media library" button, indicated by the Media Library icon, to add/or select media. 
  2. Choose the type of media you want to add.
  3. Add the file to the Media Library by choosing the file using the file browser and upload. (Your file must be of one of the allowed types. If you need to upload a file that does not have one of these file extensions, contact a site administrator to find out if your extension can be securely added.)
  4. When you add media to the library, you will see a form to fill out additional information. The specific information needed varies by site configuration and by the type of media you're adding. For Documents and Images, you will at least need to fill out any required fields associated with that media type. Images require alternative text for screen readers. Some media types, such as Videos, don't require any additional information at all by default. However you can only add videos that are currently hosted on the supported platforms, YouTube and Vimeo.
  5. When you have finished entering the required information, you have two choices: 
    1. Save and select will save the new media item(s) into the library, then return to it so you can select more items. 
    2. Save and insert will save your new media item(s) and insert them, along with any prior selections, directly into the field or text editor from which you opened the media library.