file_extension Twig Filter

The file_extension filter parses the file path and returns just the extension value if it exists.

This filter is unique to Aptuitiv. It is not part of the core Twig functionality.
{{ '/path/to/my/file.pdf'|file_extension }}
This documentation is only for Aptuitiv CMS. Learn more.
Get Started With Aptuitiv