• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Resource icon

ImageProxy Host 0.3

No permission to download

Jim Boy

Well-known member
#1
Jim Boy submitted a new resource:

ImageProxy Host - Allows caching of your proxied images

This simple add-on will append a string to the front of your proxy link when you are serving images from the XenForo Image Proxy service. That string would normally be a host such a caching service like cloudflare or cloudfront. This will freee up your web server from serving large amounts of image data.

Change the location by going to:

ACP->Options->Messages->Host for serving proxied images
Read more about this resource...
 

melbo

Well-known member
#2
Interesting. So with your addon, are these now treated as real images that could be optimized/compressed as well?
 

kontrabass

Well-known member
#3
Interesting idea, thanks for sharing! Testing it out now. Using our CDN url to take load off of apache and speed loading.
 

Jim Boy

Well-known member
#5
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.
 

Kerby

Well-known member
#6
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?
 

kontrabass

Well-known member
#8
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:

Solidus

Well-known member
#9
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.
What did you set for "Host for serving proxied images"?, not sure what to do for Cloudflare.
 

Solidus

Well-known member
#11
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 ?
 

Jim Boy

Well-known member
#16
If you use Cloudflare you don't need this addon, just use Cloudflare Page Rule to force cache proxy images.
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.
 
#17
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.
 

Jim Boy

Well-known member
#18
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?
 

Nuno

Active member
#20
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;
                }
 
Top