Skip to content

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:

ComponentTechnology
FrontendSvelteKit on Cloudflare Pages
APICloudflare Workers with Hono framework
StorageCloudflare R2 object storage
DatabaseCloudflare D1 (SQLite) with Drizzle ORM
CacheCloudflare KV for edge caching
QueuesCloudflare Queues for async processing
AuthCloudflare Access with GitHub IdP
ImagesCloudflare 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 documentation

How It Works

  1. Upload - Images are uploaded via the web UI or API to R2 storage
  2. Store - Metadata is stored in D1, images in R2
  3. Serve - Images are served via Workers with CDN caching
  4. 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.

Released under the MIT License.