What is Polish?
Polish is an image compression system that we originally released in 2012. It works by stripping meta-data and then applying lossy or lossless compression. This is done to reduce the size of the images being delivered to browsers and therefore speed the download of these objects by the clients. You can find out more about how it works in our original blog post.
What are the modes or options?
- Only strips metadata, e.g. EXIF data, but doesn't change the image
- Strips metadata and Compresses image to ~"85%"
- Creates and caches a WebP version of the file and delivers that to the browser if the accept header from the browser includes WebP. You can find out more in our Blog Post.
Example Accept header for WebP:
How can I tell if an image has been optimized by Polish?
Polish adds two headers to image requests that are compressed.
Cf-Bgj: imgq:85 Cf-Polished: qual=85, origFmt=jpeg, origSize=95005
Note that WebP conversion does not change the URLs of images. The “Content-Type” HTTP header tells the browser the true format of an image.
How can I see changes after enabling or changing a Polish setting?
Polish optimizes the cached version of a resource so cache must be purged or expired before seeing changes in Polish setting.
You can enable and change Polish settings in the speed tab: