Media/Files
Media entities allow content editors to reuse files, images, videos and audio files. They store metadata about their associated files, such as title, captions and creator credits. They are managed in the Media Library, accessible via Content > Media (see below).
Files are all associated with a media entity. When a media entity is created, a new file must be uploaded. The only way to upload a file is to create a media entity. They are managed in the File Library, accessible via Content > Files (see below).
Creating a Media Entity
Media entities can be created in two ways: via the Media Library or when creating a paragraph type that uses a media field.
Navigate to Media Library.
Accessible on the admin toolbar (top of the page when logged in). Content > Media
Click Add media.
Choose file type
Fill out fields
While each media type has different fields, the following are common to all:
- Name: used to identify the media entity in the Media Library
- Caption: text displayed below image in Callout Slider paragraph type
- Credit: text displayed with media with credit to the creator
- URL Alias: used to create a custom URL for the media entity
Click Save
Blue button at the bottom of the page.
Deleting a Media Entity/File
Completely deleting a file and its media entity is a two step proccess. First, the media entity must be deleted. Then, the file must be deleted from the File Library.
Deleting a Media Entity
Deleting a media entity will not delete its linked file.
Find the media entity in the Media Library (Content > Media) and click the Delete button.
Deleting a File
Find the file in the File Library (Content > Files) and click the Delete button. Once clicked, a notification will display "The file has been marked for deletion". The file will be marked as temporary and be permanently deleted after 6 hours.
In order to delete a file, its associated media entity must first be deleted. Read this section for an explanation of how to see and delete a file's associated media entities.
If the file is used in a media entity, a warning will appear (see below). The media entities that the file is used in must first be deleted. To see a list of media entities, click the "here" in the warning (see below).
Once "here" has been clicked (see above), a list of media entities the file is used in will be displayed (see below). Click the link under Entity (in the example below, "Fossil Map"), to navigate to the media entity where it can then be deleted.
Accessing Media Entities/Files
Generally speaking, media entities and their associated files are displayed via a paragraph type, such as callout using an image. However, below are use cases for accessing a media entity or file directly:
- Navigating to a media entity to delete/edit it
- Navigating to a file to obtain its URL and directly link to it
Navigating to a Media Entity
Media entities are like nodes in that they also are assigned IDs. To find a media entities ID, navigate to the Media Library (Content > Media) and click on the media entity. The ID will be displayed in the URL (see below).
To access a page by its media ID, use the following URL pattern:
https://<domain>/node/<node-id>
Where <domain>
is the domain name of the site and <media-id>
is the media ID of the page.
Navigating to a File
Files are assigned URLs when they are uploaded. To find a file's URL, navigate to the File Library (Content > Files) and click on the file. The URL will be displayed in the URL (see below).