SVG

SVG Twig Extension is in the core (previously, it was a dedicated extension pushword/svg).

Usage

By default, it's use FontAwesome. You just need to use twig svg function :

{{ svg('surprise') }}

Will show

Configure

By default, this extension load FontAwesome's icons.

You can choose to use your custom SVG icons by specifying the svg_dir in configuration. Default paths include:

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