Convert image to base64 string
composer require curler7/twig-base64-extension-bundle
<img src="{{ 'img/logo.svg'|image64 }}" alt="Logo" />
# config/packages/curler7_twig_base_64_extension.yaml
curler7_twig_base_64_extension:
converter:
image_to_base_64_converter: ImageToBase64Converter::class
twig:
base_64_image_extension: Base64ImageExtension::class
To run tests, run the following command
docker compose up -d