Overview
Image transformations are applied via URL parameters, making it easy to serve images at different sizes and formats:- Resize: Scale images to specific dimensions
- Crop: Extract portions of images
- Format Conversion: Convert between image formats
- Quality Control: Optimize file size
- Auto-optimization: Automatic format and quality selection
Image transformations work only on public buckets and require the image transformation addon.
Basic Transformations
Resize Image
Resize images by width and height:Resize by Width Only
Maintain aspect ratio by specifying only width:Resize by Height Only
Responsive Images
Generate multiple image sizes for responsive design:React Responsive Image
Resize Modes
Cover Mode
Crop image to fill dimensions exactly:Contain Mode
Resize to fit within dimensions:Fill Mode
Resize and add padding to exact dimensions:Quality Control
Control image quality (1-100):- High Quality
- Balanced
- Optimized
Format Conversion
Convert images to different formats:Auto Format
Automatically select the best format:Advanced Transformations
Thumbnail Generator
Thumbnail Component
Avatar with Fallback
Avatar Component
Image Gallery
Image Gallery
Performance Optimization
Lazy Loading
Lazy Loaded Image
Progressive JPEG
CDN and Caching
Transformed images are automatically cached:Transformation Limits
- Maximum dimensions: 2500 x 2500 pixels
- Maximum file size: 25MB for transformation
- Supported formats: JPEG, PNG, WebP, GIF, AVIF
URL Parameters
Alternatively, use URL parameters directly:width: Image width in pixelsheight: Image height in pixelsresize:cover,contain, orfillquality: 1-100format:webp,jpg,png,avif
Best Practices
Use WebP Format
WebP provides better compression than JPEG/PNG
Set Appropriate Quality
Quality 80 is usually a good balance
Generate Responsive Images
Use srcset for different screen sizes
Lazy Load Images
Improve page load time with lazy loading
Common Use Cases
Product Images
Product Images
User Avatars
User Avatars
Blog Images
Blog Images
Next Steps
Access Control
Secure your images with RLS policies
Upload Files
Learn how to upload images
