Polish compression options
Lossless attempts to strip most metadata, e.g. EXIF data, but does not change the image detail. Effectively, when uncompressed, a lossless image is identical to the original.
Lossy attempts to strip most metadata and compresses images by approximately 15 percent. When uncompressed, some of the redundant information from the original image is lost. Lossy has the same effect as Lossless when applied to PNG.
WebP is a modern image format providing superior lossless and lossy compression for images. WebP lossless images are approximately 26 percent smaller than PNGs, while lossy images are 25 to 34 percent smaller than JPEGs. Currently, WebP is only supported in Firefox, Google Chrome, and Opera. You can learn more in our .
Polish creates and caches a WebP version of the image and delivers it to the browser if the
Accept header from the browser includes WebP and the compressed image is significantly smaller than the lossy or lossless compression.
- Log in to the Cloudflare dashboard.
- Click the appropriate Cloudflare account for the domain where you will activate Polish.
- Click Speed > Optimization > Polish.
- Under Polish, choose Lossy or Lossless from the dropdown menu.
- (Optional) Click WebP. By applying WebP, Cloudflare can further optimize .png and .jpeg images stored in the origin server.
To ensure WebP is not served from cache to a browser lacking WebP support, disable WebP at your origin web server when using Polish.
Verify Polish is active
cf-bgj: imgq:85cf-polished: qual=85, origFmt=jpeg, origSize=95005cf-cache-status: HIT
cf-bgjheader confirms that Cloudflare applied Polish and returns the image quality setting (
cf-polishedheader represents the Polish status and returns the image quality setting (
qual) and original size (
cf-cache-statusconfirms that the image has been cached and Polish can be applied.
WebP conversion does not change the image URL. The
Content-Type HTTP header tells the browser the original format of an image.