originalgallery-image-proxy

Pass-through proxy for originalgallery.com that resizes, converts (AVIF/WebP) and caches images. Everything else goes to the origin unchanged, so the application needs no changes.

On the /works page, data per view drops from 26.1 MB to 5.0 MB. Speed, quality and cost results are in the report (in Czech).

Run locally

./certs/gen.sh          # self-signed cert for originalgallery.com
docker compose up -d    # http://localhost:8080, https on 127.0.0.1:8443

Open http://localhost:8080/works. Absolute links to originalgallery.com are rewritten to the host you came in on.

Deploy

Put the proxy in front of the app and set the environment in compose.yaml; the nginx config stays the same:

To clear the cache:

docker compose exec proxy sh -c 'rm -rf /var/cache/nginx/img/*' && docker compose restart proxy

Benchmark

cd bench && npm install && node measure.mjs

Loads /works in headless Chromium at 50 Mbit/s, first directly and then through the proxy with a cold cache and a warm cache. Results are written to bench/results.json.