On-the-fly image transformation via URL parameters: resize, crop, convert to WebP/AVIF/JPEG/PNG, adjust quality, and serve at device-pixel-ratio. Results are cached in Redis LRU and served with proper Nginx cache headers. A self-hosted Imgix or Cloudinary alternative — no per-transform billing.
Requires nSelf v1.0.9+. Set your license key with nself license set nself_pro_... before installing.
nself license set nself_pro_...
nself plugin install storage-transform
nself build
nself startAll transformations are applied via query parameters on the image URL. The plugin intercepts requests to /transform/ and processes the source image.
# Resize to 800px wide, convert to WebP
https://your-host/transform/photos/hero.jpg?w=800&fmt=webp
# Square crop at 400x400, quality 85
https://your-host/transform/photos/avatar.png?w=400&h=400&fit=cover&q=85
# 2x device-pixel-ratio
https://your-host/transform/photos/logo.png?w=200&dpr=2&fmt=avif| Parameter | Values | Description |
|---|---|---|
w | 1–8000 | Output width in pixels |
h | 1–8000 | Output height in pixels |
fit | cover, contain, fill, inside, outside | Resize behavior when both w and h are set |
fmt | webp, avif, jpeg, png | Output format |
q | 1–100 | Output quality (lossy formats) |
dpr | 1, 2, 3 | Device pixel ratio multiplier |
| Variable | Required | Default | Description |
|---|---|---|---|
PLUGIN_STORAGE_TRANSFORM_CACHE_TTL | No | 86400 | Redis cache TTL in seconds |
PLUGIN_STORAGE_TRANSFORM_MAX_PIXELS | No | 50000000 | Max source image pixel count (DoS protection) |
PLUGIN_STORAGE_TRANSFORM_RATE_LIMIT | No | 100 | Max transform requests per minute per IP |
nself plugin remove storage-transformPort: 3085 | Category: Infrastructure | Requires: nSelf v1.0.9+ | Last Updated: April 2026 | Plugin Version 1.1.1