PHP: Twig: Relative paths for images?
问题 Wondering if there is a way to use paths relative to the template storage location in the Twig templating engine. The scenario is as follows: I have a Typo3 website where my application resides in fileadmin/myApplication. I am using Twig as a template engine to render multilingual content that is loaded dynamically from JSON files. Some of my template files contain paths to images that, given the nature of Typo3, need to have a src-path of fileadmin/myApplication/img/... Now, if I want to