Templates
Image
image.twig
The image.twig
template is responsible for rendering a detailed view of a single image. It displays the image itself, along with metadata such as the title, description, upload date, and EXIF information like aperture, shutter speed, ISO, and camera model. This template provides a visually structured and informative layout for presenting individual images within the gallery.
Twig variables
Variable | Type | Data |
---|---|---|
image.title |
string | Title from the image metadata |
image.description |
string | Markdown-formatted description (parsed to HTML) |
image.filename |
string | Original filename (e.g. IMG_1234.jpg) |
image.guid |
string | Unique identifier for caching and lookup |
image.rating |
int | Rating value (e.g. 0–5) |
image.upload_date |
string | Upload timestamp in Y-m-d H:i:s format |
image.file |
string | Path to the cached image or original image (set up in the settings) |
image.exif |
object | Contains all EXIF data if available |
image.exif.aperture |
string | Formatted aperture (e.g. f/2.8) |
image.exif.shutter_speed |
string | Formatted shutter speed (e.g. 1/250s or 2s) |
image.exif.iso |
int | ISO value (e.g. 100, 800) |
image.exif.camera |
string | Camera model (e.g. Canon EOS 700D) |
image.exif.lens |
string | Lens used (if available) |
image.exif.date |
string | Original date from EXIF (e.g. 2021:09:25 16:23:28) |
image.exif.gps.latitude |
float | Latitude coordinate (if GPS available) |
image.exif.gps.longitude |
float | Longitude coordinate (if GPS available) |
Example Twig usage
<main>
<h2>{{ image.title }}</h2>
<img src="{{ image.file }}" alt="{{ image.title }}">
<div><span>{{ image.exif.camera }} | {{ image.exif.aperture }} | {{ image.exif.shutter_speed }} | ISO {{ image.exif.iso }} | {{ image.exif.focal_length }}</span></div>
{{ image.description|raw }}
</main>