WEBPery

Enable automatic WebP conversion on Cloudflare with Polish. How Polish works, lossy vs lossless settings, the WebP toggle, and Image Resizing.

Enabling WebP on Cloudflare with Polish

Cloudflare Polish converts your images to WebP automatically at the edge, with no changes to your HTML or origin files. It compresses images, optionally rewrites them to WebP for supporting browsers, and caches both versions. This guide covers enabling Polish, the lossy and lossless settings, and when to use Image Resizing instead.

For the negotiation mechanism Polish relies on, see WebP and Content Delivery Networks: Format Negotiation via Accept Headers. For the format, see What is WebP?.

What is Cloudflare Polish?

Cloudflare Polish is an image-optimisation feature that compresses and reformats images as they pass through Cloudflare's cache. It strips metadata, applies lossy or lossless compression, and can convert images to WebP for browsers that support it. Polish is available on Cloudflare Pro plans and above.

Polish operates on images served through Cloudflare's proxy. It requires no origin changes — the original files stay as JPEG or PNG, and Cloudflare serves optimised variants.

How do you enable WebP on Cloudflare?

Enable WebP by turning on Polish and ticking the WebP option in the Cloudflare dashboard. Open Speed → Optimization → Image Optimization, set Polish to Lossy or Lossless, then enable "WebP". Cloudflare then serves WebP to browsers whose Accept header includes image/webp.

The steps are:

  1. Confirm the site is proxied through Cloudflare (the orange-cloud DNS setting).
  2. Open Speed → Optimization → Image Optimization.
  3. Set Polish to Lossy or Lossless.
  4. Enable the WebP toggle.

Changes apply at the edge within minutes, with no deployment required.

What is the difference between Polish Lossy and Lossless?

Polish Lossy re-encodes images with visual compression for the smallest files; Polish Lossless removes only metadata and reorganises data without changing pixels. Lossy suits photographic content and produces the largest savings. Lossless suits graphics where exact fidelity matters.

This mirrors WebP's own modes. The choice follows content type, exactly as described in Lossy vs Lossless Compression: When to Use Each for WebP.

Does Polish convert images for all browsers?

Polish converts to WebP only for browsers that request it. It reads the Accept header on each request and serves WebP when the browser advertises image/webp, otherwise serving the optimised original format. Cloudflare caches both variants and sets Vary: Accept so each browser receives the correct one.

This per-browser negotiation means no fallback markup is needed. The Vary: Accept caching behaviour is explained in WebP and Content Delivery Networks.

When should you use Cloudflare Image Resizing instead?

Use Image Resizing when you need to change image dimensions, not just format and compression. Image Resizing generates resized variants on demand via URL parameters or the /cdn-cgi/image/ path, and can also output WebP and AVIF. Polish optimises images at their original dimensions; Image Resizing produces multiple sizes.

Combine them for full coverage: Polish for automatic format conversion, Image Resizing for responsive dimensions. For framework-level resizing, compare with How to Implement WebP in Next.js with next/image.

Does Polish affect image SEO?

Polish does not harm image SEO. Google indexes the WebP that Cloudflare serves, and the image URL, alt text, and surrounding content are unchanged. Smaller files improve page speed, which is an indirect ranking factor through Core Web Vitals.

Verify after enabling that images still return 200 and the correct Content-Type. See Image SEO Best Practices and Core Web Vitals & Images.

Where to go from here

Cloudflare Polish is the lowest-effort way to ship WebP: enable it once, and every supporting browser receives WebP automatically while older browsers keep their fallback — no markup or origin changes.

What is WebP? A Complete Guide to the WebP Image Format

WebP is Google's image format with lossy and lossless compression. Learn how it works, browser support, file sizes, transparency, and animation.

WebP Transparency: Alpha Channel Support

WebP supports an 8-bit alpha channel in lossy and lossless modes. How transparency is stored, the ALPH chunk, file-size cost, and PNG comparison.

srcset and WebP: Responsive Images with Format Fallback

Use srcset and sizes to serve responsive WebP at the right resolution per device, with a JPEG fallback. Width and density descriptors explained.

WebP File Structure: RIFF Container and Chunk Format

How a WebP file is structured: the RIFF container, the WEBP FourCC, and VP8, VP8L, VP8X, ALPH, ANIM and ANMF chunks. The byte layout explained clearly.