Log in
Model

Filter

Magento\Cms\Model\Template\Filter

What it does

This filter class processes media directives in CMS content, converting media tags into actual file paths.

Developers use this when rendering CMS pages or blocks that contain media directives like {{media url="path/to/image.jpg"}} to resolve them into proper media URLs.

It extends the email template filter to add CMS-specific media handling with security validation to prevent directory traversal attacks.

Public Methods

  • mediaDirective()