enable_image_optimization: Agent-Applied Cloudflare Image Optimization
How the Get AI Traffic agent turns on Cloudflare Polish and WebP delivery, which part of a slow LCP it fixes, and how to roll it back.
Published on July 16, 2026
enable_image_optimization is the tool the Get AI Traffic agent uses to turn on Cloudflare’s edge image optimization after you approve a fix. It switches on Polish (edge re-encoding and compression) and WebP delivery for your Cloudflare zone, so your images are compressed and served in a modern format without anyone touching the source files.
This page documents what the tool touches, what it refuses to touch, and how to undo it. For whether slow-loading content is actually costing you citations, read Slow LCP: When Your Page Loads Too Late to Get Cited. That’s the diagnosis. This page is the mechanics.
What it does
The tool sets two Cloudflare zone settings through your site’s connection: Polish and WebP. Polish re-encodes and compresses your images at the edge. WebP delivery serves a modern format, WebP or AVIF, to browsers that support it and the original format to browsers that do not. Compression defaults to lossy, and you can request lossless instead.
The work happens at the edge, on the way to the visitor. Cloudflare credentials are resolved server-side. If the site has no Cloudflare integration, the tool does nothing and returns a skipped status. It is Cloudflare-only.
What it will not touch
Your source images. The re-encode happens at the edge, per request. The tool does not resize, rewrite, or replace the original files on your origin, and it does not create stored variants in your media library.
Your page markup. This is the limit worth understanding, because a slow LCP usually has more than one cause and this tool only addresses one of them. These fixes live in the HTML and are separate content-level changes:
- a preload hint with high fetch priority, so the LCP image starts downloading immediately;
- removing
loading="lazy"from the LCP image, because you never lazy-load the thing that defines your LCP; - width and height attributes that reserve space and prevent layout shift;
- deferring or inlining render-blocking CSS and JavaScript so the browser paints sooner.
Turning on Polish will not fix an LCP that is slow because the hero image has no preload or is lazy-loaded. Those need the on-page changes above.
Your server’s response time. If time to first byte is what is slow, compressing images does not help. That is a caching and hosting problem.
Timing
Polish and WebP take effect going forward: images are optimized as Cloudflare fetches and re-encodes them. An image already sitting in the edge cache keeps serving its old version until that entry expires or is purged, so not every image changes the instant the setting is applied.
Rolling back
Before changing anything, the tool records your prior Polish and WebP settings to the ledger. roll_back restores exactly those values.
Related tools
enable_edge_cachingturns on Cloudflare HTML edge caching, a separate Cloudflare change that speeds up how fast your page’s HTML arrives, where this tool speeds up its images.purge_cacheclears a URL from the edge, which is how you force an already-cached image to be re-fetched and re-optimized instead of waiting for it to expire.
Findings this tool resolves
slow_lcp: when the LCP element is an oversized or unoptimized image, edge compression and modern-format delivery cut its download size. When the bottleneck is a slow server, a missing preload, or render-blocking scripts, the fix is elsewhere.
Want this checked on your own site?
Get your free AI-visibility audit