{% include 'partials/weather-icons.html.twig' %} {% set owner_can_edit = owner_can_edit ?? false %} {% set feed_return_url = feed_return_url ?? trip_page.url ?? '/' %}

{{ entry.title }}{% if not entry.published %} Draft{% endif %}

{% if owner_can_edit %}
Edit
{% endif %}
{% set images = entry.media.images %} {% if images|length > 0 %} {# Lightbox slides link to a 2000px fit-within DERIVATIVE, and the data-pswp-* dims are measured from that derivative's saved file — never from `img.width`/`img.height`, which are the ORIGINAL's raw stored pixels with EXIF orientation ignored. Originals from iPhones are often stored rotated (landscape pixels + EXIF "rotate 90°"), so raw dims disagree with what the browser renders and PhotoSwipe squeezes portraits into landscape boxes (BUG 2026-07-09, covered by tests/ui/post/lightbox-dims.spec.js). The derivative is re-encoded (EXIF stripped, orientation baked in when php-exif is available), so its measured dims always match its rendering. Note: .path()/.url each finalize+reset the medium's operation queue, hence the repeated cropResize() calls — the derivative file itself is cached. path() needs explicit parens: Medium is ArrayAccess and carries a 'path' ITEM (the page folder), which shadows the method in Twig's attribute resolution and hands getimagesize a directory. #} {% set firstDims = (images|first).cropResize(2000, 2000).path()|getimagesize %} {% set wrapRatio = firstDims[1] > firstDims[0] ? '4 / 5' : '4 / 3' %}
{% if images|length > 1 %} {% endif %}
{% endif %}
{{ entry.content|raw }}