SVG

The svg() Twig function (in core) inlines an icon, from FontAwesome by default:

{{ svg('surprise') }}

Result:

Contents

Configure

Set svg_dir (globally or per app; a list of directories searched in order) to use your own icons. Default:

  • %kernel.project_dir%/templates/icons
  • FontAwesome directories (solid, regular, brands - both free and standard)
  • %kernel.project_dir%/public/bundles/pushwordcore