Animation Parameters#
Convert and optimize animated GIFs to modern WebP, MP4, or WebM formats for better performance and smaller file sizes.
GIF to Video Conversion (MP4/WebM)#
Overview#
Convert animated GIFs to MP4 or WebM video for up to 90% smaller file sizes and better playback performance.
Format Comparison#
| Format | File Size | Browser Support | Transparency | Best For |
|---|---|---|---|---|
| GIF | Large | All browsers | ✅ | Compatibility |
| WebP | 60% smaller | Modern browsers | ✅ | Image context |
| MP4 ✅ | 80-90% smaller | All browsers | ❌ | Video player |
| WebM ✅ | 85-95% smaller | Modern browsers | ✅ | Transparent video |
Usage#
Basic MP4 conversion:
?transform=format:mp4
WebM conversion (transparency support):
?transform=format:webm
Resize + quality settings:
?transform=w:800,quality:85,format:mp4
Available Parameters#
| Parameter | Description | Example |
|---|---|---|
w | Width adjustment (maintains ratio) | w:800,format:mp4 |
h | Height adjustment (maintains ratio) | h:600,format:mp4 |
quality | Quality (1-100, default: 80) | quality:85,format:mp4 |
Use Cases#
Social media sharing:
?transform=w:600,quality:80,format:mp4
Background video (transparent):
?transform=w:1920,format:webm
Mobile optimization:
?transform=w:480,quality:75,format:mp4
Limitations#
- Source must be an animated GIF (static GIFs not supported)
- GIFs over 50MB cannot be converted to video (returns original)
Animated WebP Overview#
What is Animated WebP?#
A modern alternative to GIF format that offers:
- 60% smaller file size compared to GIF
- Better visual quality with lossy compression
- Smooth playback with original frame rate preserved
- Wide browser support (Chrome, Firefox, Edge, Safari 14+)
Why Use Animated WebP?#
| Feature | GIF | Animated WebP |
|---|---|---|
| File Size | Large | 60% smaller ✅ |
| Quality | Limited colors | Full color ✅ |
| Transparency | ✅ | ✅ |
| Browser Support | Universal | Modern browsers ✅ |
| Loading Speed | Slow | Fast ✅ |
Complete Examples#
Basic GIF to WebP Conversion#
?transform=format:webp,quality:85
Result: 60% smaller file with same visual quality
Optimized for Web#
?transform=format:webp,quality:85
Best for: Standard web animations with good quality
Small File Size#
?transform=format:webp,quality:75
Best for: Loading indicators, simple animations
High Quality#
?transform=format:webp,quality:90
Best for: Premium content, hero animations
Combining with Other Parameters#
Resize + Optimize#
?transform=w:600,format:webp,quality:85
Extract Region + Convert#
?transform=extract:10-10-80-80,format:webp
Full Optimization#
?transform=w:400,format:webp,quality:80
Use Cases#
Website Loading Animation#
Requirements:
- Small file size
- Quick loading
- Smooth enough
Solution:
?transform=w:100,format:webp,quality:75
Social Media Share#
Requirements:
- Optimized for mobile data
- Good quality
- Standard duration
Solution:
?transform=w:600,format:webp,quality:80
Hero Animation#
Requirements:
- High quality
- Smooth playback
- Eye-catching
Solution:
?transform=w:800,format:webp,quality:90
Tutorial GIF Optimization#
Requirements:
- Clear and readable
- Manageable file size
- Full animation
Solution:
?transform=w:800,format:webp,quality:85
Important Notes#
Requirements#
- Source format: Original must be GIF or animated format
- Format parameter: Must use
format:webp - Static images: Cannot be converted to animated format
What Works#
✅ ?transform=format:webp
✅ ?transform=w:600,format:webp,quality:85
✅ ?transform=format:mp4
✅ ?transform=format:webm
✅ ?transform=w:800,quality:85,format:mp4What Doesn't Work#
❌ ?transform=format:mp4 (static GIF) // Only animated GIFs supportedPerformance Comparison#
File Size Reduction#
| Original GIF | Animated WebP | Reduction |
|---|---|---|
| 5.2 MB | 2.1 MB | 60% |
| 10.8 MB | 4.3 MB | 60% |
| 15.0 MB | 6.0 MB | 60% |
Quality Comparison#
- Visual quality: Near-identical to original GIF
- Color support: Full RGB vs GIF's 256 colors
- Animation: Original frame rate preserved
Browser Support#
Supported Browsers#
- Chrome 32+ ✅
- Firefox 65+ ✅
- Edge 18+ ✅
- Safari 14+ (macOS 11+) ✅
- Opera 19+ ✅
Fallback Strategy#
<picture>
<source srcset="animation.webp" type="image/webp" />
<img src="animation.gif" alt="Animation" />
</picture>Next Steps#
- Download Control - Control download behavior
- Best Practices - Learn optimization strategies
- Use Cases - See more real-world examples
