Cloudflare Polish has been updated to create AVIF versions of JPEG and PNG files served from your origin, while still supporting WebP conversion. The change matters to AI, cloud, DevOps, and security teams because smaller image payloads lower egress costs, speed up content delivery, and alter caching and request‑handling patterns that must be accounted for in deployment pipelines and monitoring.
Configuring AVIF in Polish
AVIF can be turned on through the Cloudflare CLI, the dashboard, or the REST API. A typical CLI workflow looks like this:
cf zones settings edit polish --zone example.com --body '{"value":"lossy"}'
cf zones settings edit avif --zone example.com --body '{"value":"on"}'
cf zones settings edit webp --zone example.com --body '{"value":"on"}'
Enabling both AVIF and WebP is allowed; the service will decide which format to serve based on the rules described below.
Selection Logic and Browser Compatibility
- The client must list AVIF support in its
Acceptheader for Polish to consider AVIF. - Polish serves AVIF only when the converted file is smaller than the original source.
- If a browser advertises both AVIF and WebP, Polish prefers AVIF.
- Clients without AVIF support receive WebP if enabled, otherwise the optimized original format.
Operational Considerations
Because conversion happens at the edge, origin servers see the same request pattern regardless of the final format, but cache keys may now include the negotiated image type. Teams should verify that cache‑purge policies and CDN logs correctly differentiate AVIF, WebP, and original assets to avoid stale content serving. Monitoring bandwidth and latency after enabling AVIF can confirm the expected reduction in transfer size. Additionally, any security tooling that inspects image payloads must be aware that the same URL may return different binary formats depending on the request headers.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Review your zone settings and enable AVIF where bandwidth savings are valuable. Update CI/CD pipelines to include the CLI commands or API calls for consistent configuration across environments. Adjust cache‑key logic and observability dashboards to track AVIF delivery rates and size reductions. Finally, test fallback paths for browsers that lack AVIF support to ensure they continue receiving WebP or the original optimized image without disruption.
