Overview
Media items, including Documents, Images and Remote videos, can be added to your website in several ways. In this section, we will explore adding media to the Media Library and assigning it a Directory.
Types of media that are supported
The following media types are supported out of the box in Rapid Start:
- Documents, including PDF, XLS, XLSX, DOC and DOCX can be added
- Images, including PNG, GIF, JPG, JPEG and SVG can be added
- Remote videos, including YouTube and Vimeo videos can be streamed
Additional types of media can be added by request to the DE&S team via CS Connect.
How to setup a 'folder structure' in the Media Library
Drupal uses a flat structure for media and does not come with the ability to create a folder structure out of the box. To address this, a customisation has been built in Rapid Start to allow editors to create a structure in the Media Library using taxonomy to create and nest terms to simulate a folder structure. In Rapid Start, this is called a 'directory'. By default, media items are added to the 'Root' directory, but editors can choose to store these in a pre-configured directory upon import.
To add a folder structure, navigate to the Structure > Taxonomy > Media Directory taxonomy list. Editors can add parent and/or child terms from this menu to create the desired structure. It is also possible to drag-and-drop to reorder items, including indenting items to create a nested parent and child relationship between terms. In the example below, 'Sample videos' and 'Training videos' are child terms of the 'Videos' term.
When adding a term, you can also specific the parent of the new term from the 'Relations' accordion and selecting the parent from the 'Parent terms' list.
Alternatively, from the main list of Media Directory terms, you can select the dropdown in the Operations column and select 'Add child' to create a new term as a child of an existing term.
Organising your media
If all your media is in a single directory, don't worry, we've got you covered! We've introduced the Media tree which allows editors to drag and drop media items into directories to organise your media library.
How to add media
Documents can be added directly to the Media Library via the Content menu by selecting Content > Media > Add Media and selecting the media type you wish to add. You can also access this menu by navigating to '/media/add' on your website.
Adding Documents
When adding documents, editors have the following options:
- Name - this is the name of the document. It is recommended that this be a readable name with spaces and limiting the use of numerals.
- Document - a file upload field for the document to be added into the Drupal media library.
- Directory - the parent folder you wish for the document to be stored in so it can be easily found. This is an optional field.
- Additional options:
- Revision information - an optional log message which will be shown in the Revisions tab for the document in the Media Library.
- URL alias - an alternate URL by which the document can be accessed. It is not recommended to provide direct links to documents as they should be accessed via a webpage, so please carefully consider whether a URL alias is required.
- Scheduling options - allowing editors to schedule changes to the content moderation status (also known as publishing status) of the document, including Publishing and/or Unpublishing at a set date and time.
- Authoring information - basic information such as the creator and date and time the document was added.
- Save as - the content moderation status that will be applied when the document is added to the Media Library. This will default to Draft which is only accessible to editors but includes options for Published and Unpublished.
Adding images
When adding images, editors have the following options:
- Image - a file upload field for the document to be added into the Drupal media library.
- Alternative text - a field which is only visible once you add an image. This field is used by screen readers to describe the image to visually impaired users. This is a mandatory field which is required for accessibility. If the image is purely decorative, editors should add a double quote or "" to tell screen readers to skip the image when reading out the page content.
- Image Credit - an optional field if an image credit should be displayed for users to view. When enabled, this will display as a camera icon which overlays the image on the website that reveals the image credit when clicked.
- Image Description - an optional field if an image description should be displayed for users to view. When enabled, this will display as a camera icon which overlays the image on the website that reveals the image description when clicked.
- Directory - the parent folder you wish for the image to be stored in so it can be easily found. This is an optional field.
- Save as - the content moderation status that will be applied when the image is added to the Media Library. This will default to Draft which is only accessible to editors but includes options for Published and Unpublished.
- Additional options:
- Revision information - an optional log message which will be shown in the Revisions tab for the image in the Media Library.
- URL alias - an alternate URL by which the document can be accessed. It is not recommended to provide direct links to images as they should be accessed via a webpage, so please carefully consider whether a URL alias is required.
- Authoring information - basic information such as the creator and date and time the image was added.
Adding Remote Videos
When adding remote videos, editors have the following options:
- Title - this is the title of the video which is shown to screen readers.
- Video URL - the URL of the video from YouTube or Vimeo (this is the standard URL of the video, not the 'embed' URL).
- Caption - a short description of the content in the video.
- Transcript URL - a URL to the transcript for the video (this could be hosted on the streaming platform or a link to a content page on your website with the transcript).
- Transcript link text - the text label for the transcript link (e.g. 'View transcript').
- Directory - the parent folder you wish for the remote video to be stored in so it can be easily found. This is an optional field.
- Published (checkbox) - remote videos do not have a content moderation state, they are either Published (when the checkbox is checked) or Unpublished (when the checkbox is unchecked).
- Tags - taxonomy terms to tag content to allow for filtering in dynamic components, such as the Video Gallery. Multiple tags can be added by selecting the 'Add another item' button under the Tags field.
- Additional options:
- Revision information - an optional log message which will be shown in the Revisions tab for the remote video in the Media Library.
- URL alias - an alternate URL by which the document can be accessed. It is not recommended to provide a URL alias to a remote video.
- Authoring information - basic information such as the creator and date and time the remote video was added.
Publishing media items
If the media being added is not sensitive at the time of loading into the media library, it is recommended to set the content moderation status to Published so that you don't have to come back and update it to Published in the future.