media_helper
Security covered
This module serves two main purposes:
- Making it easier to customize the output of image-based media entities via display formatter. The image style, custom classes, and other HTML attributes can be specified directly in a new formatter for media reference fields.
- Making it easier to output file-based media entities like image- and video- based media entities in Twig. The image style, custom classes, and other HTML attributes can be specified directly in Twig. Cache metadata for the media is handled automatically.
The `media_helper` service that powers the additional formatter and Twig functions provides public methods that can assist with programmatic rendering.