# Media library

GovCMS provides a central media library, where all media assets, such as images, documents and other files are stored.

Depending on the type of media asset, a corresponding type of media should be used.

## Media types

By default, GovCMS provides the following Media types:

1. Audio
2. File
3. Image
4. Remote Video
5. Video

Each Media type can have various forms and display fields configured.

## Media library overview

To access the Media Library, click on **Content** in the *Admin menu* then hover over *Media* and click on *Media Library*.

![Image of accessing Media Library](https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2Fgit-blob-1b9b0fd894993eca764e056fc4dc5d3708b568c0%2FUnit-6-Media-Library-1.png?alt=media)

The main elements of the *Media Library* page and their functions are:

1. Add media
2. Table and Grid tabs. These allow switching between views of Media
3. A search and filtering area
4. A Media listing table that displays the Media entities matching the filtering criteria, or lists all Media entities if no filters are applied.
5. Bulk operations

These elements are highlighted and numbered on the screenshots below.

<figure><img src="https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2FgYvNamI6r0m1rPlDGIYq%2Fimage.png?alt=media&#x26;token=fa5d47d2-1c1c-4318-8432-2e8c33458d07" alt=""><figcaption><p>Screenshot of the Media Library UI</p></figcaption></figure>

<figure><img src="https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2F9f4TEargU42EScCiwwbH%2Fimage.png?alt=media&#x26;token=c227f2e0-274c-454a-8275-06a50d143b5a" alt=""><figcaption><p>Screenshot showing Bulk Media Actions</p></figcaption></figure>

The **Add media** button allows you to add new Media assets to the site.&#x20;

The **Filters** allow you to filter and search the media library for an existing media asset.&#x20;

The **Bulk operations area** allows you to implement bulk operations on multiple media assets. For example, you can use the checkboxes to select multiple media assets, then delete all selected media assets at by clicking the **Apply to selected items** button.

## Adding Media

To add media to the *Media Library*, click the **+Add media** button at the top left of the *Media Library* page.

**Note** This can also be performed by clicking **Content** → **Add media** when currently not on the *Media Library* page.

![Image of accessing Add Media](https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2Fgit-blob-b02e4a66549a206bb7320391322e315d0310f8d5%2FUnit-6-Media-Library-Add-Media-1.png?alt=media)

This brings you to a page that lists all media types available on the site. Click the appropriate media type, for example Image.

![Image of Add Media](https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2Fgit-blob-3e0485ea8e4d4d02b058a0742da357719ef8641e%2FUnit-6-Media-Library-Add-Media-2.png?alt=media)

Fill out all required fields. Providing some tags and a Revision log message can help manage large media libraries. Save the Media.

## Reusing media

The main advantage of having the central media library is reusability - the same media asset can be included in multiple content pages.

Media assets that were uploaded to the site directly from content (such as by uploading an image into the Rich Text Editor) will appear in the central Media library and can be also reused on other pages on the site.

## Uploading media - Content form

When creating or editing content via a content form (e.g. the *Page form*) the form includes an area to upload a thumbnail image.

<figure><img src="https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2F1E5cqxhFhoA2H0XiM5px%2Fimage.png?alt=media&#x26;token=f7ff1fb9-4649-4ba7-ae3c-93c8312bfa1d" alt=""><figcaption><p>Thumbnail Media upload form</p></figcaption></figure>

When you click on the **Add media** button from the content form, an overlay window opens showing a list of available media to select from the media library.

<figure><img src="https://1079433754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyh9JMywljz0CN8oT8o%2Fuploads%2FOT50SfERFf058eUf6Z7D%2Fimage.png?alt=media&#x26;token=3d6264af-ace3-4b71-9e0a-da3e0c48624f" alt=""><figcaption><p>Image upload widget</p></figcaption></figure>

Click on **Select files** to open a file browser, or drop files on the highlighted area.

**Note** The Files page is rarely used by users, and there is a proposal to remove this page from Drupal / GovCMS in future.
