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

ImageProxy Host 0.3

Allows caching of your proxied images

  1. Jim Boy

    Jim Boy Well-Known Member

    Jim Boy submitted a new resource:

    ImageProxy Host - Allows caching of your proxied images

    Read more about this resource...
     
    melbo likes this.
  2. melbo

    melbo Well-Known Member

    Interesting. So with your addon, are these now treated as real images that could be optimized/compressed as well?
     
  3. kontrabass

    kontrabass Well-Known Member

    Interesting idea, thanks for sharing! Testing it out now. Using our CDN url to take load off of apache and speed loading.
     
  4. motowebmaster

    motowebmaster Active Member

    I'm interested in hearing about experiences as well.
     
  5. Jim Boy

    Jim Boy Well-Known Member

    I can only go by my own experience and so far it is working fine. The code is super simple so have a review if you feel inclined. I've only run this through cloudfront but I dont see why this wouldn't work on other cdns.
     
  6. Kerby

    Kerby Active Member

    I'm not sure about the purpose of this addon. Is this addon only useful when I have a CDN to move the image cache from localhost to CDN?
     
  7. Jim Boy

    Jim Boy Well-Known Member

    Yep - don't bother unless that is what you want to do.
     
    Kerby likes this.
  8. kontrabass

    kontrabass Well-Known Member

    Happy to report that this is working great! With over 1 million proxied images, it's taken the CDN a while to get everything cached, so after 24 hours I'm just now starting to see a decrease in apache load.
     
    Last edited: Feb 2, 2016
    Jim Boy likes this.
  9. Solidus

    Solidus Well-Known Member

    What did you set for "Host for serving proxied images"?, not sure what to do for Cloudflare.
     
  10. kontrabass

    kontrabass Well-Known Member

    I use keycdn, so I'm not sure... I just put our CDN url with trailing slash
     
  11. Solidus

    Solidus Well-Known Member

    So the url looks like this?

    Code:
    http://domain.com/domain.kxcdn.com/proxy.php?image=xxxxxx
    If so, I guess I can enter something like "CF" and mine will become CF/proxy.php?image= then set a page rule in Cloudflare. Right @Jim Boy ?
     
  12. RoldanLT

    RoldanLT Well-Known Member

    If you use Cloudflare you don't need this addon, just use Cloudflare Page Rule to force cache proxy images.
    [​IMG]
     
    Gossipy and Solidus like this.
  13. melbo

    melbo Well-Known Member

    Working great here with Cloudfront.
    Thanks for this.
     
    Jim Boy likes this.
  14. Solidus

    Solidus Well-Known Member

    Oh I forgot about that. You sure the css.php rule works? I use BD Cache so they end in .css
     
  15. RoldanLT

    RoldanLT Well-Known Member

    Css.php file cache works better than having bdcache :).

    No need for extra addon.
    You can verify by either miss/hit cache header.
     
  16. Jim Boy

    Jim Boy Well-Known Member

    If you are using cloudflare to serve your site, then this add-on is indeed redundant. This addon is only useful fir sites that go direct to the webservers for primary html and use cdn's to serve static data.

    I personally dont use cloudflare, but the principle is that you are effectively are creating a proxied version of your site on alternative url.
     
    Xon and RoldanLT like this.
  17. motowebmaster

    motowebmaster Active Member

    Just installed, configured, and verified that it's working on a proxied image inserted last year.

    However, I had to disable it afterward. Found a problem with an image in a user's signature. Instead of a small map of the us, one of the proxied images from the same thread was displaying instead. When I disabled the addon the issue was resolved.

    I love this idea, would like to try it again.
     
  18. Jim Boy

    Jim Boy Well-Known Member

    That sounds like it may have been an issue with your cdn. Did the url of the proxied image match what it was when the ad-on was off?
     
  19. melbo

    melbo Well-Known Member

    No issues here
     
  20. Nuno

    Nuno Active Member

    Hi

    I tested this and it's rewriting links too. This should only prepend the url if we're proxying images.

    Something line this will do it:

    Code:
                    if ($proxyType == 'image')
                    {
                            return $proxy.'proxy.php?' . $proxyType . '=' . urlencode($url) . '&hash=' . $hash;
                    } else {
                            return 'proxy.php?' . $proxyType . '=' . urlencode($url) . '&hash=' . $hash;
                    }
    
     
    Jim Boy likes this.

Share This Page