Overview
The Fluxer Media Proxy is a specialized service for transforming, optimizing, and delivering media content. It handles image resizing, format conversion, video thumbnail generation, and external media proxying.Endpoints
Browse media proxy endpoints
Image Transformations
Dynamic image resizing and format conversion
Video Processing
Thumbnail extraction and frame generation
External Media
Proxy and cache external images
Architecture
The media proxy is built with performance and security in mind:Key Components
Request Coalescer
Request Coalescer
In-memory request coalescing prevents duplicate processing of the same media. Multiple simultaneous requests for the same resource are merged into a single operation.
Image Processor
Image Processor
Built on Sharp library for high-performance image transformations:
- Format conversion (JPEG, PNG, WebP, AVIF)
- Resizing and cropping
- Quality optimization
- Color space management
Video Processing
Video Processing
FFmpeg-based video processing:
- Thumbnail generation
- Frame extraction
- Codec validation
- Metadata extraction
NSFW Detection
NSFW Detection
Machine learning-based NSFW content detection for user-uploaded media.
Cloudflare Edge Protection
Cloudflare Edge Protection
Optional IP allowlist to ensure all traffic comes through Cloudflare’s edge network.
Base URL
The media proxy is typically deployed on a dedicated domain:Authentication
The media proxy uses different authentication methods depending on the endpoint:Public Endpoints
Public media endpoints (avatars, icons, attachments, etc.) require no authentication and can be accessed directly:Internal Endpoints
Internal endpoints (metadata extraction, thumbnail generation) require authentication via a shared secret key:Secret key configured in
mediaProxy.secretKeyExternal Media Proxy
External media URLs are signed using HMAC to prevent abuse:secretKey configuration.
Configuration
The media proxy is configured via the following options:Static Mode
WhenstaticMode is enabled, the media proxy acts as a simple S3 proxy, forwarding all requests to the static bucket:
Performance Features
Request Coalescing
The media proxy includes intelligent request coalescing:Caching Headers
All media responses include appropriate cache headers:Format Optimization
Images are automatically optimized:- JPEG: Progressive encoding, optimized quality
- PNG: Compression level 9
- WebP: Modern format with superior compression
- AVIF: Next-gen format for supported clients
Rate Limiting
The media proxy supports rate limiting to prevent abuse:Health Check
The media proxy includes a health check endpoint:Telemetry
The media proxy exposes telemetry information:Error Handling
The media proxy returns appropriate HTTP status codes:200 OK- Media successfully retrieved/processed400 Bad Request- Invalid parameters or malformed request403 Forbidden- IP not allowed (Cloudflare protection)404 Not Found- Media not found in storage429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Processing error
Error Response
Security Features
Cloudflare Edge Protection
WhenrequireCloudflareEdge is enabled, the media proxy only accepts requests from Cloudflare’s IP ranges:
HMAC Signing
External media URLs are signed using HMAC-SHA256 to prevent URL tampering and ensure only authorized external media can be proxied.Content Validation
All uploaded media is validated:- MIME type verification
- Codec validation for videos
- File size limits
- Format restrictions
NSFW Detection
The media proxy can detect NSFW content using machine learning models to flag inappropriate content before it’s served.Metrics and Tracing
The media proxy supports comprehensive observability:Metrics
- Request count and duration
- S3 operation metrics
- Image processing metrics
- FFmpeg operation metrics
- NSFW detection metrics
Tracing
Distributed tracing for request flows:- Request ingress
- S3 operations
- Image transformations
- External HTTP requests
Next Steps
Endpoints
Explore media proxy endpoints
Image Transformations
Learn about image transformation parameters
API Reference
Return to API overview
Configuration
Configure media proxy for your deployment