Using Automatic Image Optimization
Automatic image optimization helps you deliver practical image variants without hand-tuning every format and compression setting. In Imgwire, the core pattern is to request format=auto and quality=auto on delivery URLs.
https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?width=1200&format=auto&quality=auto
What automatic optimization does
Automatic optimization affects delivered variants. It does not rewrite the original image you uploaded.
| Option | What Imgwire does |
|---|---|
format=auto | Chooses a browser-friendly output format based on the request and supported output formats |
quality=auto | Chooses a practical compression setting for the transformed image based on source and output details |
The CDN layer resolves automatic format negotiation from the request. The image processing layer resolves automatic quality because it can inspect the source image and the requested output.
Use automatic settings with resizing
Optimization works best when you also deliver the right dimensions. Resize first, then let Imgwire choose the format and compression for that variant.
const cardUrl = image.url({
width: 640,
height: 360,
resizing_type: 'cover',
format: 'auto',
quality: 'auto',
});
This produces a delivery variant for the card slot instead of sending the original upload and relying on the browser to scale it down.
When to use explicit values
Automatic settings should be the default for public web images, but explicit values are still useful when you have a specific requirement.
Use explicit format when:
- A downstream system only accepts one image type.
- A design needs a specific output behavior, such as PNG output.
- You are comparing formats during performance testing.
Use explicit quality when:
- You have a known file-size target.
- A visual review process requires a fixed encoder setting.
- You are generating a repeatable asset where the same input should always use the same quality value.
https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?format=jpeg&quality=85&width=1200
Advanced delivery options
Imgwire also exposes delivery options such as Progressive for JPEG output and Chroma Subsampling. Use their auto values unless you have a concrete visual or file-size reason to override them.
https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?format=jpg&quality=auto&progressive=auto&chroma_subsampling=auto
Best practices
- Use
format=auto&quality=autofor most public image delivery. - Resize images to the layout slot before relying on compression to reduce bytes.
- Use presets for common sizes and explicit width/height/crop settings for exact layouts.
- Test real content types, such as screenshots, product photos, generated images, and portraits.
- Keep transformation URLs stable for repeated placements so the CDN can reuse variants.
Common mistakes
- Treating
quality=autoas a replacement for resizing. - Forcing JPEG everywhere and losing transparency or better modern-format delivery.
- Using one fixed quality value for every format and content type.
- Expecting automatic optimization to change the source image stored in Imgwire.
Related pages
Last updated at: May 8, 2026