Perfect images at every size
Resize, crop, and convert images on-the-fly via URL transforms. WebP, AVIF, and automatic format selection. Cached globally for instant delivery.
import { Stack0 } from '@stack0/sdk'const stack0 = new Stack0({ apiKey: process.env.STACK0_API_KEY })// Upload an imageconst { url } = await stack0.cdn.upload({file: imageFile,folder: 'products',})// Transform via URL parametersconst thumbnail = `${url}?width=200&height=200&fit=cover`const webp = `${url}?format=webp&quality=80`// Or use the SDK for programmatic transformsconst optimized = stack0.cdn.transform(url, {width: 1200,height: 630,fit: 'cover',format: 'webp',quality: 85,})
Features
What's included
Resize & Crop
Width, height, fit modes. Cover, contain, fill, and smart crop options.
Format Conversion
WebP, AVIF, PNG, JPEG. Auto-select best format for each browser.
Quality Control
Balance quality and file size. Compression you can fine-tune.
Effects
Blur, sharpen, grayscale, and more. Image effects via URL.
Global Cache
Transforms cached at 200+ edge locations. Fast everywhere.
Instant Processing
First request transforms in milliseconds. Subsequent requests served from cache.
Why Stack0
Built for production
URL transforms
Add parameters to any image URL. No preprocessing or build steps required.
Modern formats
Automatic WebP and AVIF conversion. Smaller files, faster loads.
Global CDN
Transformed images cached at edge locations worldwide. Sub-100ms delivery.
Responsive images
Generate srcset variants on demand. Perfect images for every device.
Smart cropping
Face detection and smart crop for thumbnails that focus on what matters.
Simple pricing
$0.50 per 1,000 transforms. Cached results served free.
Applications
Common implementations
Responsive Images
Serve perfectly sized images for mobile, tablet, and desktop.
Thumbnails
Generate product thumbnails, avatars, and gallery previews on demand.
Social Sharing
Create properly sized images for Twitter, Facebook, and LinkedIn.
E-commerce
Product images optimized for listings, detail pages, and zoom views.
FAQ
Frequently asked questions
Stack0 CDN supports JPEG, PNG, GIF, WebP, AVIF, and SVG. You can convert between formats on-the-fly using the format parameter. Use format=auto to let us serve the best format for each browser.
Transformed images are cached at 200+ edge locations worldwide. The first request generates the transform, then subsequent requests are served from cache with sub-100ms latency. Cache invalidation is automatic when you update the source image.
The maximum file size is 100MB per image. For optimal performance, we recommend keeping source images under 20MB. There's no limit on the number of images you can upload.
Yes, use fit=cover with gravity=auto to enable face detection and smart cropping. The system automatically detects faces and important objects, ensuring they stay in frame when cropping.
You pay $0.50 per 1,000 transforms. A transform is any unique combination of URL parameters. Cached results don't count as new transforms - you only pay for unique transformations.
Ready to build?
Plans start at $5/month.