PixEngine is a high-performance, policy-first image optimization engine designed to optimize images through explicit orchestration. Unlike traditional "black-box" tools, PixEngine puts your business logic at the center of the image pipeline.
- Policy-First: Decisions are driven by testable policies, not opaque configurations.
- Explicit Orchestration: You control when and how images are transformed and where they are stored.
- Pluggable Architecture: Easily swap storage providers (S3, Local) and processing engines (Sharp).
- Zero-Vendor Lock-in: Works with your existing infrastructure, no proprietary CDN required.
pixengine/
├─ packages/
│ ├─ core/ # Brain: Policy evaluation & orchestration
│ ├─ adapter-engine-sharp/ # Sharp-based transformation engine
│ ├─ adapter-storage-local/ # Local filesystem storage
│ ├─ adapter-storage-s3/ # AWS S3 storage
│ ├─ adapter-storage-r2/ # Cloudflare R2 storage
│ ├─ adapter-storage-gcs/ # Google Cloud Storage
│ ├─ adapter-storage-azure/ # Azure Blob Storage
│ ├─ middleware-express/ # Express.js middleware
│ └─ middleware-nextjs/ # Next.js App Router handler
└─ examples/ # Reference implementations
- Policies: Code-based rules that inspect image metadata and decide which variants (sizes, formats) to generate.
- Adapters: Standardized interfaces for storage and engines, making the core logic infrastructure-agnostic.
- Variants: Managed versions of a single source image (e.g.,
original,thumbnail.webp,banner.avif).
PixEngine is currently in Active Development (Alpha).
- Monorepo structure & Core orchestration
- Sharp Engine Adapter
- Storage Adapters (Local, S3, R2, GCS, Azure)
- Express.js & Next.js Middleware
- Policy DSL Specification
- Smart Variants & Metadata Extraction
- CDN Integration & Cache Management
For detailed documentation, please refer to:
MIT © 2025 PixEngine Team