Repository navigation
EvaThumber 2.0.0
Self-hosted image transformation service. Cloudinary-style transformation URLs over a read-only mount of your own images, derived images cached on disk, served with HTTP caching semantics. PHP 8.5 + FrankenPHP + libvips in a single nonroot image, linux/amd64 and linux/arm64.
Quick start
docker run -p 8080:8080 -v /path/to/your/images:/data/images:ro docker.io/allovince/evathumbercurl -o out.webp 'http://localhost:8080/image/upload/c_fill,w_300,h_300/f_webp/your-image.jpg'/data/images is the only parameter you need. The image needs no config file, no migration and no setup command. Pin :2.0.0 if you do not want to follow :latest.
Add -v evathumber-cache:/data/cache to keep derived images across restarts; the cache is rebuildable data, so deleting it is always safe and never needs backup.
What is in 2.0.0
- Resize and crop modes
c_scale/fit/fill/crop/thumb/pad/limit, dimensions,ar,dpr, compass gravity, NW-coordinate crop. - Right-angle rotation, flips, grayscale, negate.
- Output formats jpg/png/webp/avif/gif,
f, extension delivery,f_autonegotiation,q_auto[:best|good|eco|low]. - On-disk cache with single-flight cold misses, fixed-slot admission with bounded 503 rejection, persistent transform pool with crash recovery.
/healthzfor liveness,/readyzfor readiness (source readable, cache writable, at least one live worker).- Cloudinary-compatible URL prefixing: both
/image/upload/...and/{cloud_name}/image/upload/...are accepted. - Same image works as a Composer library; the library core is independent of the HTTP layer.
Not in scope
Remote/S3 sources, authentication, multi-tenancy, TLS termination, admin UI, animation, and full Cloudinary semantics. q_auto is a local edge-density heuristic and is explicitly not Cloudinary-equivalent.
Verified before release
- 63 tests / 877 assertions and PHPStan level 8 on native
linux/amd64andlinux/arm64runners, plus five Docker acceptance suites per architecture (run 36328625145, commitf383e21). - 32 real HTTP load-test scenarios with zero failures, every 200 fully decoded and dimension-checked (report).
- Crash recovery: busy worker, container and pool supervisor killed mid-encode, plus in-flight graceful stop; every recovered product is byte-identical to one from a container that never crashed.
- The published tag itself: anonymous manifest pull returns 200 for
:2.0.0and:latest, andrc1-acceptanceplus the 141-checkdocker-acceptancesuite pass against the pushed image.
Operational notes
- Cache identity includes the policy string
evathumber-2-policy-3and the q_auto policy. If you upgrade the underlying codec, bump that policy string explicitly, otherwise previously cached derivatives are reused. - The cache is derived data: deleting it never affects originals and the service regenerates on demand. It does not need backups.
- The mounted image directory must be readable by the container user (uid 33). A
0700directory works on macOS but yields 404s on Linux hosts, visible as"source": falseon/readyz. - Memory is bounded by RSS sampling plus bounded rejection, not by a kernel hard limit. Large sources with AVIF output or
w_3000,h_3000can hitworker_memory_limitand return 503 by design; WebP keeps more headroom. - Caddy's graceful shutdown has no upper bound in this version: roughly 4% of
docker stopcalls can take the full 20s. The service still exits 0; usestop_grace_period: 45sas incompose.yaml. - TLS termination and multi-replica orchestration are the deployer's responsibility and are not promised by the README.
Full documentation: docs/ · review: docs/release-review.md