How to get the type file in volt ?
I usually retrieve in php by strtolower(substr(strrchr($filename, '.'), 1));
So in the volt how to do?
You can do the same, you just need to add functions. https://docs.phalcon.io/en/3.1/volt#extending-functions
If your problem does not involce security and it is just for presentation you can add the functions to volt, like Wojciech suggested:
However if you want to do things right and do not trust the filename itself, you should go with finfo.