Templates
Timeline
timeline.twig
The timeline.twig
template is used to display a visual timeline of images — like an Instagram feed. It automatically shows your uploaded images with their date, title, and optional description.
What it does
- Shows all images from your gallery in a nice grid
- Displays the upload date on each image
- Optionally shows a title and description
- Uses smaller optimized images for faster loading
Available Twig Variables
The template receives an array called timeline
containing image entries. Each image entry is a structured array with the following variables:
timeline – List of images
{% for image in timeline %}
{# render image card #}
{% endfor %}
Inside each image object
Variable | Type | Description |
---|---|---|
image.filename | string | Original filename (e.g. IMG_1234.jpg) |
image.guid | string | Unique image identifier (used for thumbnails) |
image.title | string | Optional title of the image |
image.description | string | Optional description text |
image.upload_date | string | Upload date (Y-m-d H:i:s format), used for sorting and display |
image.url | string | Default image URL (e.g. medium-sized version) used in the gallery |
image.thumb.s | string | URL to the small image version (e.g. for thumbnails) |
image.thumb.m | string | URL to the medium image version (used by default) |
image.thumb.l | string | URL to the large image version |
image.thumb.xl | string | URL to the extra large image version |
image.exif.Camera | string | (optional) Camera model, if available |
image.exif.Lens | string | (optional) Lens used |
image.exif.Aperture | string | (optional) Aperture setting (e.g. f/5.6) |
image.exif.Date | string | (optional) Original capture date from EXIF |
image.tags | array | Array of tags (strings), can be used for filtering |
Example Twig usage
<img src="{{ image.thumb.m }}" alt="{{ image.filename }}" class="rounded shadow" />
{% if image.title %}
<h3 class="text-lg font-semibold">{{ image.title }}</h3>
{% endif %}
{% if image.description %}
<p class="text-sm text-gray-600">{{ image.description }}</p>
{% endif %}
<p class="text-xs text-gray-500">Uploaded: {{ image.upload_date|date("d.m.Y H:i") }}</p>