1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Server Configuration and Hosting' started by Amin Sabet, Sep 25, 2015.

  1. Amin Sabet

    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?

  2. Amin Sabet

    Amin Sabet Well-Known Member

    I opened a ticket with CloudFlare stating the following:

    Hello, I am proxying images on my server in the following format:
    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:
    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?
  3. digitalpoint

    digitalpoint Well-Known Member

    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.
  4. Amin Sabet

    Amin Sabet Well-Known Member

    Polish does compress images with your addon but doesn't seem to cache or compress them with the XenForo image proxy.
  5. digitalpoint

    digitalpoint Well-Known Member

    Oh, oops... thought you were talking about my Image Proxy. lol Nevermind. :)
  6. Amin Sabet

    Amin Sabet Well-Known Member

    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."
  7. eva2000

    eva2000 Well-Known Member

Share This Page