Trying to ma work polish

hello i try to make polish work on my website but i don’t why even when i activate lossy and webp nothing happen …
I am using wordpress

Did you purge the cache?

1 Like

yes the cache of the website the cache of Cloudflare many time

What browser are you using, and how can you tell nothing is happening?

WebP only works in Chrome. And if the image is already fully optimized, Polish will do little to nothing.

i am on chrome
i have a plugin who compress my image

If the image is optimized Polish will simply pass the images. Ideally we should see some headers. If it were possible to post a link to one sample image it would be great @lazymonkey!

So, looking at one of the images at random (for example this I see these headers:

accept-ranges: bytes
cache-control: public, max-age=31536000
cf-bgj: imgq:85
cf-cache-status: HIT
cf-polished: pngoptimizer, origSize=10289, status=vary_header_present
cf-ray: 4659e1513cfe3dad-MXP
content-length: 8210
content-type: image/png
date: Sat, 06 Oct 2018 17:34:40 GMT
etag: "2831-57777c61ad64e"
expect-ct: max-age=604800, report-uri=""
expires: Sun, 06 Oct 2019 17:34:40 GMT
host-header: 192fc2e7e50945beb8231a492d6a8024
last-modified: Fri, 05 Oct 2018 09:19:52 GMT
server: Cloudflare
status: 200
vary: X-Forwarded-Proto,Accept-Encoding
x-proxy-cache: MISS

As you can see there is a cf-bgj and a cf-polished header meaning that it worked. As you can see in the support article I’ll link to you at the end the WebP format change doesn’t actually change the file extension/URL.

1 Like

You did use Chrome, right? Hmm, shouldnt the mime type have changed? :confused:

On a related note, Edge and Firefox will support WebP too -

Yes I did, the Content-Type header changes (if the changes are worth it), the actual URI doesn’t. That’s what I said.

I got that bit, but the mime type in your response still indicates PNG, hence the question.

It probably doesn’t make sense and it doesn’t actually improve the size. It doesn’t always convert to WebP if you enable it. Only if needed.

PS: don’t know all the status types, there might be something going on with that status=vary_header_present.

That would explain it then.

ok to make simple it’s working
my file file are not convert to webp because it’s not needed ?

Correct. From the blog post:

But it will also convert the image to WebP, if WebP can shrink the image data more than the original format.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.