Contao Summit 2026 in Leipzig 15th and 16th October

contao_figure - Twig Function

This function takes the same arguments as the figure function, but renders the image directly. There is an additional argument where you can define which template to use to render the figure.

Note

Using the contao_figure function has been deprecated and will no longer work in Contao 6. Use the figure function together with the component/_figure.html.twig component instead.

Arguments

  • from: Can be a FilesModel, a FilesystemItem, an ImageInterface, a tl_files UUID/ID/path or a file system path.
  • size: A picture size configuration or reference or size array.
  • configuration: Additional configuration for the FigureBuilder.
  • template: Optional figure template (default is @ContaoCore/Image/Studio/figure.html.twig)