Getting proxy images to work well with CloudFlare compression (Polish)

Amin Sabet

Well-known member
I have photography forums and proxy a lot of images. When I use the @digitalpoint image proxy, cloudflare automatically picks up the images and compresses them for me (I have Polish compression enabled). However, I'm having some other issues with that addon (every once in a while someone complains that there image doesn't show up) that have led me to go back and forth between that one and XenForo image proxy.

When using the XenForo image proxy, CloudFlare doesn't compress the images. Not sure why. Maybe because the URLs don't end in an image extension like jpg or png? Anyone know a fix for this?

Thanks,
Amin
 
I opened a ticket with CloudFlare stating the following:

Code:
Hello, I am proxying images on my server in the following format:

https://www.talkemount.com/proxy.php?image=https%3A%2F%2Ffarm4.staticflickr.com%2F3805%2F20328154866_5e79b202ed_h.jpg&hash=b4186f99a85dbc466e0ee20d9ee08654

It seems that CloudFlare is not recognizing these as JPEGs and therefore they are not being compressed by Polish.

If I proxy the same image in a different format:

https://www.talkemount.com/proxy/AoCyM05066%2FX9IWNLWLIE4JlprZEQERqMRQEXcvEux2uJi1xYPM%2BZfI9McusOfH1v9hOHY8xaVRouX0E9yeJnw%3D%3D/image.png

Then CloudFlare does recognize it as an image and apply Polish compression.

Is there a way to get CloudFlare to recognize the first format as an image and apply Polish compression?

Thanks, 
Amin
 
When using the XenForo image proxy, CloudFlare doesn't compress the images. Not sure why. Maybe because the URLs don't end in an image extension like jpg or png? Anyone know a fix for this?
The URL does end with .png, but that was really just a bit of a hack to get CloudFlare to cache the images. CloudFlare caches the images based on the extension, not the HTTP Content-Type header.

As far as why Polish isn't compressing images for you, you'll need to wait to get a response from CloudFlare on that. I've never used it myself.
 
The URL does end with .png, but that was really just a bit of a hack to get CloudFlare to cache the images. CloudFlare caches the images based on the extension, not the HTTP Content-Type header.

As far as why Polish isn't compressing images for you, you'll need to wait to get a response from CloudFlare on that. I've never used it myself.

Polish does compress images with your addon but doesn't seem to cache or compress them with the XenForo image proxy.
 
I opened a ticket with CloudFlare stating the following:

Code:
Hello, I am proxying images on my server in the following format:

https://www.talkemount.com/proxy.php?image=https%3A%2F%2Ffarm4.staticflickr.com%2F3805%2F20328154866_5e79b202ed_h.jpg&hash=b4186f99a85dbc466e0ee20d9ee08654

It seems that CloudFlare is not recognizing these as JPEGs and therefore they are not being compressed by Polish.

If I proxy the same image in a different format:

https://www.talkemount.com/proxy/AoCyM05066%2FX9IWNLWLIE4JlprZEQERqMRQEXcvEux2uJi1xYPM%2BZfI9McusOfH1v9hOHY8xaVRouX0E9yeJnw%3D%3D/image.png

Then CloudFlare does recognize it as an image and apply Polish compression.

Is there a way to get CloudFlare to recognize the first format as an image and apply Polish compression?

Thanks,
Amin


Here's the reply I got from CloudFlare:

"No, unfortunately. Polish does work off the extension rather than the Content-Type, so it will always see those images as a .php file and not process them."
 
Back
Top Bottom