What is PixelFlare?
PixelFlare is a self-hostable, Cloudflare-native image CDN with library management. Think of it as your own Imgur alternative that you fully control.
Features
- Quick, easy and free to deploy - One-click fork-and-deploy via GitHub Actions
- Web UI and API access - Intuitive dashboard and RESTful API for programmatic use
- Organization - Organize images into albums and tag them for easy discovery
- Built-in transformations - On-the-fly resizing, cropping, and format conversion
- Permanent URLs - Images never expire (unless you manually delete them!)
- Highly performant - Served on edge via Cloudflare's global network
- Cost effective - Generous free tier, pay only for what you use
- Multi-user support - GitHub SSO with Cloudflare Access
Tech Stack
This is a vendor-locked Cloudflare application, designed to leverage their excellent free tier and edge performance:
| Component | Technology |
|---|---|
| Frontend | SvelteKit on Cloudflare Pages |
| API | Cloudflare Workers with Hono framework |
| Storage | Cloudflare R2 object storage |
| Database | Cloudflare D1 (SQLite) with Drizzle ORM |
| Cache | Cloudflare KV for edge caching |
| Queues | Cloudflare Queues for async processing |
| Auth | Cloudflare Access with GitHub IdP |
| Images | Cloudflare Image Resizing for transformations |
Project Structure
pixflare/
├── wrangler.toml # Cloudflare Workers configuration
├── packages/
│ ├── api/ # API Worker (Hono + TypeScript)
│ ├── frontend/ # SvelteKit UI (Cloudflare Pages)
│ ├── shared/ # Shared types and constants
│ ├── config/ # Shared configuration
│ └── database/ # D1 database schema and migrations
├── terraform/ # Infrastructure as Code
└── docs/ # This documentationHow It Works
- Upload - Images are uploaded via the web UI or API to R2 storage
- Store - Metadata is stored in D1, images in R2
- Serve - Images are served via Workers with CDN caching
- Transform - Variants are generated on-demand using Cloudflare Image Resizing
Cost
With Cloudflare's free tier, you can host thousands of images for free. Typical costs:
- 10,000 images: ~$0.35/month (R2 storage)
- 1M requests/month: $0.00 (Workers free tier)
- Bandwidth: $0.00 (R2 to Workers is free)
See the deployment guide for details.