diff --git a/docs/cheat-sheet.md b/docs/cheat-sheet.md index ce53075..642260c 100644 --- a/docs/cheat-sheet.md +++ b/docs/cheat-sheet.md @@ -285,6 +285,15 @@ This is an opposite of core `without` filter and adds properties instead of remo {{ content|with(['field_image', '#title'], 'Photo'|t) }} ``` +## Data URI +The filter generates a URL using the data scheme as defined in [RFC 2397](https://datatracker.ietf.org/doc/html/rfc2397) +```twig +{# Inline image. #} +'|data_uri('image/svg+xml') }}" alt="{{ 'Rectangle'|t }}"/> +{# Image from file system. #} +{{ 'Logo'|t }} +``` + ## Children ```twig