The Gallery Must Forget Its Name
A gallery is a lie.
It presents curated fragments of entropy—pixels hallucinated from noise—framed with false permanence. But in static site generation, that’s what we want: frozen output, timeless illusion. And yet, filenames betray us. They whisper the origin: comfyui_001.png, comfyui_002.png. No mystery. No wonder. Just leakage from the pipeline.
That cannot stand.
Obfuscation as Aesthetic
ComfyUI, Stable Diffusion, and friends are prodigious but predictable. They produce a torrent of .pngs with names like comfyui_1234.png, timestamped like corpses in a morgue. The naming convention is not just ugly—it’s revealing. It breaks immersion. It makes the viewer see the scaffolding.
But what if the gallery forgot? What if filenames became opaque tokens—UUIDs, cryptographic ghosts—detached from context? We don’t just want static. We want amnesia.
The Deterministic UUID Trick
Random UUIDs at build time are chaos without meaning—fine for obfuscation, terrible for caching. We need a deterministic transformation. A reversible yet unique mapping. So we hash the original filename using a digest like SHA-1 or SHA-256 and take the first N hex digits. Or base58 it. Or truncate a Blake3 sum. Whatever preserves entropy and collision resistance.
Here’s a simple Node/JS snippet baked into Astro’s astro:build pipeline:
import fs from "fs";
import crypto from "crypto";
import path from "path";
const IMAGES_DIR = "./public/images";
const OUTPUT_DIR = "./public/gallery";
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
const hashName = (filename) => {
const hash = crypto.createHash("sha1").update(filename).digest("hex");
return `${hash.substring(0, 12)}${path.extname(filename)}`;
};
const files = fs.readdirSync(IMAGES_DIR).filter(f => f.endsWith(".png"));
files.forEach(file => {
const hashed = hashName(file);
fs.copyFileSync(
path.join(IMAGES_DIR, file),
path.join(OUTPUT_DIR, hashed)
);
});
This transforms:
comfyui_0071.png → f6e2c1b3d8a9.png
No clue where it came from. The past is gone. Only the artifact remains.
Bonus: Mapping Index
For development sanity, generate a .json index that maps original filenames to their new identities. This allows you to build pages, thumbnails, or even reverse-lookup tools during preview/dev.
Astro and the Static Abyss
Astro makes this dance almost delightful. You can:
- Auto-generate image galleries at build time from a folder
- Use Markdown/MDX to describe each image or inject poetic metadata
- Leverage
astro:assetsto optimize formats, sizes, and alt text - And with the above script, erase the sin of origin names
Rendering becomes recursive: the generator builds a gallery of hallucinations, the site builder obfuscates their genesis, and the viewer encounters only the frozen results—detached, anonymous, sacred.
Embedding the Forgotten
But what of the blog posts themselves? What if you want to reference these anonymous artifacts within your writing—not as external links, but as embedded visions?
Enter the double-bracket syntax: [[imagename]].
A simple remark plugin transforms these tokens into <img> tags, scaled to 512x512 to preserve page flow. The plugin searches through /galleryimages/ subdirectories, matching filenames without extensions. No database. No API calls. Just filesystem traversal at build time.
// In your markdown:
// [[sunset-dream]] becomes:
// <img src="/galleryimages/abstracts/f3a2b9c8d1e7.png"
// alt="sunset-dream"
// style="max-width: 512px; max-height: 512px;" />
The beauty lies in the manual curation. Yes, you must know the filenames. Yes, you must type them exactly. But this friction is intentional—it forces deliberate selection. Each embedded image is chosen, not algorithmically suggested.
For a static site, this is perfect. The build process resolves all references, validates all paths, and freezes the connections into HTML. No runtime lookups. No broken links. Just deterministic embedding of curated entropy.
Joy in the Artifact
There’s joy in building a gallery that doesn’t break.
No backend. No API. No CDN logic.
Just HTML, images, and entropy—compiled into permanence. And now, with embedded references, the blog posts themselves become galleries—scattered fragments of the larger collection, contextual windows into the abyss.
A gallery not as a service, but as an offering. A monolith of frozen dreams, names forgotten, UUIDs stitched into a temple of light and void. Each [[token]] a deliberate invocation, each embedded image a chosen ghost.
Let the filename die. Let the form remain. Let the double brackets summon what was lost.
You can check out my gallery here: https://zeropoint.sh/gallery/
/032c079f-b8a4-4274-85cb-283f15abe5ff.jpeg)
References
- Astro Documentation: Static File Handling (Astro, 2025)
- Node.js
cryptomodule: Cryptographic operations (Node.js Docs, 2025) - ComfyUI Image Generation Output Format (ComfyUI GitHub, 2025)
- On UUIDs and Content Hashing (Wikipedia, 2025)