> For the complete documentation index, see [llms.txt](https://docs.varbase.vardot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.varbase.vardot.com/developers/understanding-varbase/varbase-recipes/varbase-media-base.md).

# Varbase Media Base

The **Varbase Media Base** recipe provides comprehensive media handling for Varbase sites, including media types, image styles, responsive image configurations, media library enhancements, and file handling capabilities.

## Drupal.org Project

<https://www.drupal.org/project/varbase_media_base>

## Recipe Dependencies

Depends on the following Drupal core recipes:

| Recipe                                                      | Description                                                               |
| ----------------------------------------------------------- | ------------------------------------------------------------------------- |
| **core/recipes/audio\_media\_type** *(Drupal core)*         | Adds the Audio media type for managing audio file content.                |
| **core/recipes/image\_media\_type** *(Drupal core)*         | Adds the Image media type with default image-handling configuration.      |
| **core/recipes/local\_video\_media\_type** *(Drupal core)*  | Adds the local Video media type for self-hosted video files.              |
| **core/recipes/remote\_video\_media\_type** *(Drupal core)* | Adds the remote Video media type for embedding YouTube and Vimeo content. |

## Included Modules

Brings in the following core and contributed modules to your site:

| Module                                                                                    | Purpose                                                                                             |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **Media** *(in Drupal core)*                                                              | Manages the creation, configuration, and display of media items.                                    |
| **Media Library** *(in Drupal core)*                                                      | Enhances the media list with additional features to more easily find and use existing media items.  |
| **File** *(in Drupal core)*                                                               | Provides a field type for files and defines a "managed\_file" Form API element.                     |
| **Image** *(in Drupal core)*                                                              | Defines a field type for image media and provides display configuration tools.                      |
| **Breakpoint** *(in Drupal core)*                                                         | Manages breakpoints and breakpoint groups for responsive designs.                                   |
| **Views** *(in Drupal core)*                                                              | Provides a framework to fetch information from the database and to display it in different formats. |
| [**Better Exposed Filters**](https://www.drupal.org/project/better_exposed_filters)       | Provides advanced options (e.g. links, checkboxes, or other widgets) to exposed Views elements.     |
| [**Crop API**](https://www.drupal.org/project/crop)                                       | Provides storage and API for image crops.                                                           |
| [**Drimage Improved**](https://www.drupal.org/project/drimage_improved)                   | Optimized responsive images using client hints and automatic srcset generation.                     |
| [**DropzoneJS entity browser widget**](https://www.drupal.org/project/dropzonejs)         | DropzoneJS Entity browser widget.                                                                   |
| [**Embed**](https://www.drupal.org/project/embed)                                         | Provides a framework for different types of embeds in text editors.                                 |
| [**Focal Point**](https://www.drupal.org/project/focal_point)                             | Allows users to specify the focal point of an image for use during cropping.                        |
| **Field UI** *(in Drupal core)*                                                           | Provides a user interface for the Field module.                                                     |
| [**Media Bulk Upload**](https://www.drupal.org/project/media_bulk_upload)                 | Allows uploading files in bulk and converting them to media entities.                               |
| [**Media Bulk Upload: DropzoneJS**](https://www.drupal.org/project/media_bulk_upload)     | Allows DropzoneJS integration with media bulk upload.                                               |
| [**Media Library Bulk Upload**](https://www.drupal.org/project/media_library_bulk_upload) | Adds a multi-file upload page, with a permission per media type.                                    |
| [**Media Library Edit**](https://www.drupal.org/project/media_library_edit)               | Add an edit button to the Media Library widget when an item is selected.                            |
| [**Views Bulk Operations**](https://www.drupal.org/project/views_bulk_operations)         | Adds an ability to perform bulk operations on selected entities from view results.                  |
| [**Views Infinite Scroll**](https://www.drupal.org/project/views_infinite_scroll)         | A pager which allows an infinite scroll effect for views.                                           |
| [**Views Bulk Edit**](https://www.drupal.org/project/views_bulk_edit)                     | Allows bulk edition of entity field values.                                                         |
| [**WebP**](https://www.drupal.org/project/webp)                                           | Generates WebP copies of image style derivatives.                                                   |
| [**Varbase Media**](https://www.drupal.org/project/varbase_media)                         | Provides Varbase media types, view modes, and configurations.                                       |
| [**Drupal Canvas**](https://www.drupal.org/project/canvas)                                | Page builder used by Varbase. Enabled here so media references resolve inside Canvas pages.         |

## Bulk Uploads

Two modules upload several files at once, with different media types. Both appear on the Media page:

| Path                               | Module                    | Media types                                                                                               |
| ---------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------- |
| `/media/bulk-upload`               | Media Bulk Upload         | Audio, Image and Video, from `media_bulk_upload.media_bulk_config.media_bulk_upload` (`remote_video: 0`). |
| `/admin/content/media/bulk-upload` | Media Library Bulk Upload | One `use media <type> bulk upload form` permission per type.                                              |

Varbase Media Base grants the Media Library Bulk Upload permission for `audio`, `document`, `image`, `remote_video`, `svg_image` and `video` to the **Content editor**, **Content admin** and **Site admin** roles, and `use media_bulk_upload bulk upload form` to those and the **SEO admin** role. No role gets it for `remote_audio`, so **Remote audio** is added at `/media/add/remote_audio`. See [Known Issues on a New Varbase 11 Site](/developers/known-issues-on-a-new-varbase-11-site.md).

## Installation

Apply the recipe using Drush:

```bash
ddev drush recipe ../recipes/varbase_media_base
```

This recipe is automatically applied when using the Varbase Starter recipe.
