Centralize duplicated getToken() + Bearer header logic into a single formatHeaders() helper in lib/api.ts. When no token exists, the Authorization header is omitted entirely instead of sending an empty Bearer token, which breaks forward-auth proxies like Authelia behind Caddy. Changes: - Add formatHeaders() with try-catch around localStorage access - Replace 20+ duplicated getToken() definitions across tool components - Migrate all call sites including file-details, settings, change-password - Update tests to verify header omission on empty token Based on the fix proposed by @jules2689 in #6, with improvements: file placement (lib/api.ts vs components), localStorage error handling, simplified truthiness check, and complete call-site coverage. Co-Authored-By: Julian Nadeau <julian@jnadeau.ca>
We're renaming! The Stirling PDF team asked us to pick a new name, and we want you to choose it.
Vote on the new name →
Voting closes April 10, 2026
Stirling Image
Stirling-PDF but for images. 30+ tools and local AI in a single Docker container.
Key Features
- 30+ image tools - Resize, crop, compress, convert, watermark, color adjust, and more
- Local AI - Remove backgrounds, upscale images, erase objects, blur faces, extract text (OCR). All running on your hardware with pre-downloaded models, no internet required
- Pipelines - Chain tools into reusable workflows. Batch process up to 200 images at once
- REST API - Every tool available via API. Interactive docs included at
/api/docs - Single container - One
docker run, no Redis, no Postgres, no external services - Multi-arch - Runs on AMD64 and ARM64 (Intel, Apple Silicon, Raspberry Pi)
- Your data stays yours - No telemetry, no tracking, no external calls. Images never leave your machine
Quick Start
docker run -d -p 1349:1349 -v stirling-data:/data stirlingimage/stirling-image:latest
Don't need AI tools? The lite image is 1.5 GB instead of 11 GB:
docker run -d -p 1349:1349 -v stirling-data:/data stirlingimage/stirling-image:lite
Open http://localhost:1349 in your browser.
Default credentials:
| Field | Value |
|---|---|
| Username | admin |
| Password | admin |
You will be asked to change your password on first login. This is enforced for all new accounts and cannot be skipped in production.
For Docker Compose, persistent storage, and other setup options, see the Getting Started Guide. For details on the full vs lite image, see Docker Tags.
Documentation
Contributing
Contributions welcome. See CONTRIBUTING.md for guidelines, the Developer Guide for setup, and the Translation Guide for adding languages.
Support
Bug reports and feature requests: GitHub Issues
License
This project is dual-licensed under the AGPLv3 and a commercial license.
- AGPLv3 (free): You may use, modify, and distribute this software under the AGPLv3. If you run a modified version as a network service, you must make your source code available under the AGPLv3. This applies to personal use, open-source projects, and any use that complies with AGPLv3 terms.
- Commercial license (paid): If you want to use Stirling Image in proprietary software or SaaS without the AGPLv3 source-disclosure requirement, a commercial license is available. Contact me for pricing and terms.

