Images
A small basic image resizing tool is built into the site's system.
The resize is done to the largest width and the resized image is cached.
The cached image is automatically updated if the original image changes.
Raw image
- Twig code:
<img src="{{ asset('../assets/twig.png') }}">
- Rendering:
Resized image
- Twig code:
<img src="{{ thumbnail('../assets/twig.png', 200) }}">
- Rendering:
Coming from the pages
folder and not public
, only access via resize is possible:
- Twig code:
<img src="{{ thumbnail('../php.png', 100) }}">
- Rendering:
Url format
Original image | Resized image |
---|---|
{path}{basename}.{extension} |
{path}{basename}.{size}.{extension} |
some/path/image.jpg |
some/path/image.512.jpg |
- Supported extensions:
jpg
,png
,gif
- Supported dimensions: minimum
16
, maximum2000