MeltyMedia CDN Hub.
MeltyMedia is a high-performance, on-the-fly image processing and delivery engine built directly into the MeltyBase Hub. It eliminates the need for expensive third-party image CDNs by providing dynamic transformations natively on your server.
Dynamic Processing Engine
MeltyMedia introspects your Independent Storage and applies transformations during the request lifecycle. By simply appending query parameters to an asset URL, you can resize, reformat, and optimize images in real-time.
Query-Based API
Modify images via URL: /v1/hub/assets/img_id?w=800&q=75&fmt=webp
Storage Native
Pulls seamlessly from local NVMe or S3 buckets without extra configuration.
Lanczos High-Fidelity Resampling
MeltyMedia utilizes the Lanczos resampling algorithm for downscaling. Unlike standard linear or bilinear filters, Lanczos provides superior sharpness and reduces aliasing artifacts, ensuring your assets look premium across all device resolutions.
// Internal Transformation Logic
dstImage = imaging.Resize(srcImage, params.Width, params.Height, imaging.Lanczos);
SHA-256 Deterministic Caching
To ensure sub-millisecond response times for subsequent requests, MeltyMedia generates a deterministic cache key based on a SHA-256 hash of the transformation parameters. Once an image is transformed, it is cached in the local asset pool for immediate retrieval.
- Hash Inputs:
AssetID | Width | Height | Format | Quality. - Storage: Cached transforms are stored in the
.cachedirectory of your local project volume.
DoS & Resource Hardening
To prevent resource exhaustion attacks (DoS), MeltyMedia enforces strict hardware-level guards. Every request is parsed and validated before the transformation engine is engaged.
// Safety Constraints
if width > 4000 || height > 4000 {
return Error("Maximum resolution exceeded");
}
- Resolution Cap: Hard limit of 4000x4000 pixels.
- Timeout Enforcement: All transformation jobs are capped at 10 seconds to prevent thread-locking.
Placeholder Intelligence (BlurHash)
MeltyMedia works in tandem with the Storage metadata vault to serve BlurHash strings. These ultra-compact placeholders can be displayed while the full asset is loading, providing a fluid user experience even on slow connections.