nginx serves /crops/, not /images/

The site's crop store was renamed — see its own commit for why the name was wrong. This is the fourth
place that had to move with it: the constant, the development route, the build's copy target, and this
cache rule.

The rule itself is unchanged. A year and immutable is still EARNED here rather than assumed: the
filename is a hash of the original, its stamp, the framing, the slot and the width, so the bytes at a
given URL can never legitimately change.

A site published before the rename carries /images/ in its HTML and no longer has the files behind it.
The fix is a publish, which rewrites every one of those URLs anyway.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-31 12:23:01 +01:00
co-authored by Claude Opus 5
parent 3b18615bbb
commit 3650a3c2b9
+6 -1
View File
@@ -266,7 +266,12 @@ const NGINX_CONF = `server {
# the filename is a hash of the original, the framing, the slot and the width, so the bytes at a given
# URL can never legitimately change. A re-crop is a different name, and the HTML that carries it is
# revalidated every visit. This is the difference from /derived/ above, which is rewritten in place.
location ^~ /images/ {
#
# `/crops/`, and it was `/images/` until 2026-08-31 — a name taken from the URL rather than from what
# is behind it, beside two other directories equally full of images. A site published before the
# rename has `/images/` in its HTML and no longer has the files; the fix is a publish, which rewrites
# every one of these URLs anyway.
location ^~ /crops/ {
expires 1y;
add_header Cache-Control "public, immutable";
}