New answers tagged

1

Hope this helps: I needed a hash that only changed if the resource file is modified thus allowing reliable caching. Usage: <img src="{{ hash('/images/my_image.jpg') }}" Can be used for javascript, css or an image resource. // src/Twig/appExtension.php namespace App\Twig; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; class ...


Top 50 recent answers are included