The Media Proxy is Fluxer’s specialized service for processing, transforming, and serving media content. It handles image resizing, video thumbnails, format conversion, and content moderation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fluxerapp/fluxer/llms.txt
Use this file to discover all available pages before exploring further.
Service Overview
The media proxy provides:Image Processing
Resize, crop, and convert images to optimal formats
Video Thumbnails
Extract frames from videos for previews
Format Conversion
Convert between WebP, PNG, JPEG, and GIF
NSFW Detection
Detect and flag explicit content
Architecture
The media proxy is built with:- Hono - High-performance web framework
- Sharp - Fast image processing
- FFmpeg - Video thumbnail extraction
- S3 - Media storage backend
- Cloudflare - Edge caching and firewall
Image Processing
Request Format
SHA-256 hash of the image
Target width in pixels (max: 4096)
Target height in pixels (max: 4096)
Output format:
webp, png, jpeg, gifQuality level:
low, medium, high, losslessPreserve animation (for GIF/WebP)
Quality Settings
| Quality | WebP | JPEG | PNG |
|---|---|---|---|
low | 60 | 60 | Compression 8 |
medium | 75 | 75 | Compression 6 |
high | 90 | 90 | Compression 4 |
lossless | 100 | 100 | Compression 0 |
Example Requests
Video Thumbnails
Extract Frame
SHA-256 hash of the video
Thumbnail width (max: 1920)
Thumbnail height (max: 1080)
Output format:
jpeg, png, webpQuality level (default:
medium)Timestamp in seconds to extract frame from
Example
External Media
Proxy external URLs through Fluxer:URL-encoded external image URL
NSFW Detection
Detection Service
The media proxy includes optional NSFW detection:Configuration
NSFW detection requires a trained model file. This feature is optional and disabled by default.
Metadata Extraction
Get Image Metadata
Supported Formats
Input Formats
- Images: JPEG, PNG, WebP, GIF, BMP, TIFF, SVG
- Videos: MP4, WebM, MOV, AVI (for thumbnails)
Output Formats
- WebP - Best compression and quality
- PNG - Lossless with transparency
- JPEG - Wide compatibility
- GIF - Animation support
Authentication
Media proxy endpoints require authentication:Generating Signed URLs
Caching
The media proxy implements multi-layer caching:Cache Headers
Rate Limiting
Media proxy has specific rate limits:| Operation | Limit | Window |
|---|---|---|
| Image Processing | 100 | 1 minute |
| Video Thumbnails | 20 | 1 minute |
| External Media | 30 | 1 minute |
| Metadata | 200 | 1 minute |
Error Handling
Common Errors
Invalid Hash
Invalid Hash
Invalid Parameters
Invalid Parameters
Processing Error
Processing Error
Rate Limited
Rate Limited
Configuration
Cloudflare Integration
Edge Firewall
The media proxy includes Cloudflare edge detection:- Validates requests come from Cloudflare edge
- Blocks direct access when
requireCloudflareEdgeis enabled - Extracts real client IP from
CF-Connecting-IP
Edge Caching
Configure Cloudflare caching:Performance Optimization
Image Processing
Concurrency Control
The media proxy uses a coalescer to prevent duplicate processing:Monitoring
Metrics
The media proxy tracks:- Request count by endpoint and status
- Processing time for transformations
- Cache hit ratio
- Error rate by type
- Bandwidth usage
Health Check
Best Practices
Use WebP
Request WebP format for best compression and quality. It’s supported by all modern browsers.
Specify Dimensions
Always specify width/height to allow the proxy to optimize processing and caching.
Leverage Caching
Use consistent URLs for the same transformations to maximize cache hits.
Quality vs Size
Use
medium quality for most images. Use high only for important images where quality matters.