Skip to main content
Convert images to modern, efficient formats for better compression and performance. Bunny Optimizer supports a wide range of input formats and can transcode to optimized output formats.

Parameter

format
string
Convert the image to a specific output format.Accepted values: webp, jpeg, png, gifDefault: Original format (or auto-optimized based on configuration)

How it works

Bunny Optimizer can automatically convert between image formats, enabling you to serve modern, efficient formats like WebP while accepting legacy formats as input. When configured with automatic format optimization, Bunny Optimizer detects client browser capabilities and serves the most optimal format. Browsers that support WebP receive WebP images, while older browsers receive JPEG or PNG.

Supported formats

Input formats

Bunny Optimizer accepts the following input formats:
  • JPEG - Standard web image format
  • PNG - Lossless format with transparency support
  • WebP - Modern format with superior compression
  • GIF - Animation and simple graphics format
  • BMP - Bitmap image format
  • TIFF - High-quality image format
  • TGA - Truevision graphics format
  • PBM - Portable bitmap format
  • HEIC (beta) - High-efficiency image format from Apple devices
  • HEIF (beta) - High-efficiency image file format

Output formats

Bunny Optimizer can convert images to these output formats:
  • JPEG - Best for photographs without transparency
  • PNG - Best for graphics, logos, or images requiring transparency
  • WebP - Modern format offering 25-35% better compression than JPEG
  • GIF - Best for simple animations or limited-color graphics
WebP output is limited to a maximum dimension of 16,383 pixels on either width or height.

Usage

Format conversion

Convert images to different formats to optimize compression or ensure compatibility.
Convert to WebP
https://yourzone.b-cdn.net/image.jpg?format=webp
Convert to PNG for transparency
https://yourzone.b-cdn.net/image.jpg?format=png
Convert to JPEG for smaller file size
https://yourzone.b-cdn.net/image.png?format=jpeg
WebP typically offers 25-35% better compression than JPEG at equivalent quality levels, making it ideal for web delivery when browser support is available.

Automatic format optimization

Configure Bunny Optimizer to automatically serve the best format based on client browser capabilities. Enable WebP in your Optimizer settings to allow automatic format selection. When enabled:
  • Browsers supporting WebP receive WebP images
  • Older browsers receive JPEG or PNG fallbacks
  • No code changes required on your end
This ensures optimal performance without requiring manual format detection or maintaining multiple URL variants.
When automatic format optimization is enabled, your image URLs will remain as their original file type (e.g., .png or .jpg). The actual format served is determined by the content-type HTTP header, which will show image/webp when WebP is delivered. This approach ensures compatibility with browsers that don’t support WebP while making implementation easier.

Animation support

Bunny Optimizer supports manipulation of animated image formats:
  • WebP (animated)
  • GIF (animated)
  • PNG (APNG format)
Animation manipulation is in preview. Some features may change as we continue development.
Apply transformations like resizing, cropping, and color adjustments to animated images. The animation frames are processed while maintaining timing and loop settings.
Resize animated GIF
https://yourzone.b-cdn.net/animation.gif?width=400
Convert animated GIF to WebP
https://yourzone.b-cdn.net/animation.gif?format=webp

Common considerations

Transparency handling

When converting from formats that support transparency (PNG, WebP, GIF) to formats that don’t (JPEG), all transparent areas become opaque with a white or black background. If you need to preserve transparency, ensure your output format supports it:
  • Use format=png or format=webp for transparent images
  • Avoid format=jpeg when transparency is required

WebP configuration

Images are only encoded as WebP when you have WebP enabled in your Bunny Optimizer settings. To enable WebP output:
  1. Navigate to your Pull Zone settings
  2. Go to Optimizer → Settings
  3. Enable WebP support
Without this configuration, format=webp requests may not produce WebP output.

Format selection guidance

Use JPEG when:
  • Serving photographs or complex images
  • Transparency is not required
  • Maximum browser compatibility is needed
Use PNG when:
  • Images contain transparency
  • Graphics, logos, or text require sharp edges
  • Lossless compression is preferred
Use WebP when:
  • You need smaller file sizes than JPEG
  • Browser support for WebP is acceptable (most modern browsers)
  • You want transparency with better compression than PNG
Use GIF when:
  • Simple animations are required
  • Limited color palettes are acceptable
  • Legacy compatibility is essential

Combining with other transformations

Format conversion works seamlessly with all other Bunny Optimizer parameters:
Convert format and adjust quality
https://yourzone.b-cdn.net/image.jpg?format=webp&quality=75
Resize and convert format
https://yourzone.b-cdn.net/image.png?width=800&format=jpeg
Complete optimization with format conversion
https://yourzone.b-cdn.net/image.jpg?width=1200&crop=800,600&format=webp&quality=80&sharpen=true
Combining format conversion with quality control and resizing creates an efficient optimization pipeline that reduces bandwidth while maintaining visual quality.