Removing .php extension from proxy.php images ?

eva2000

Well-known member
Sort of related to https://xenforo.com/community/threa...oxy-to-slow-origin-servers.81774/#post-818153

Suggestion:

For Xenforo default image proxy url to be customised without the .php extension i.e. /proxy/ instead of /proxy.php similar to Digitalpoint's proxy image addon which serves proxied images from /proxy/image https://marketplace.digitalpoint.com/image-proxy.2306/item and maybe also make the proxy timeout adjustable within admin.php

Why
  1. Seems to alleviate issues reported at https://xenforo.com/community/threads/how-sensitive-is-the-image-proxy-to-slow-origin-servers.81774/ for broken images
  2. I use Nginx with ngx_pagespeed module for better performance and pagespeed can't optimise proxy.php served images and auto convert to webp format using Xenforo default proxy image feature. While pagespeed can if the proxied images were served via /proxy/image without the .php extension - see benefits at https://community.centminmod.com/threads/benefits-of-ngx_pagespeed.1032/.
broken images served via Xenforo default image proxy

xenforo_proxy_image_hog_process_newrelic_01.webp
xenforo_proxy_image_hog_process_newrelic_02.webp
xenforo_proxy_image_hog_process_newrelic_03.webp
 
Last edited:
Upvote 49
Meh... I care about security (as in encryption). Do users really care about the annoying identity validation part of it? Like have you ever gone to an SSL site, looked at the details of their SSL certificate and been like, "**** this site... They didn't validate their identity as a human being.... I'm out."
 
[Meh?] sorry for the question..
I'll not do that again. Sorry.
--
Edit: and thanks for the explanation.
 
Last edited:
But if you look at the underlying HTTP headers from each request:

https://tools.digitalpoint.com/headers?url=https://forums.digitalpoint.com/proxy/Rx0STmZmm7qNyyA%3D/thumb.png
https://tools.digitalpoint.com/headers?url=https://forums.digitalpoint.com/proxy/Rx0STmZmm7qNyyA%3D/thumb

You can see that CloudFlare is able to serve up the request with the .png extension from cache in whatever CloudFlare data center is closest to the user (better performance when the user is able to get the image from a CloudFlare data center cache).


Is that different than what I get from adding these page rules to CloudFlare?


pagerules.webp
 
I have also reduced the timeout in ImageProxy.php and it has greatly improved my site's performance when the image proxy attempts to access images from slow origin servers. (y)

What value do you suggest? My sites are photography forums, and I am suffering badly with this issue!
 
What value do you suggest? My sites are photography forums, and I am suffering badly with this issue!
I'm actually using the defaults now.

I solved the issue by increasing the number of PHP-FPM processes (I've also since moved to a larger, dedicated server with more memory, so I can have a lot more processes). Adjusting these values in your PHP configuration is definitely the next thing I would recommend looking into, though the exact values to use will depend entirely on your hosting environment.
 
Yes, please. Cloudflare has stopped caching our images ever since we enabled the image proxy. It's had a big impact on our bandwidth use and of course the server bills!
 
Top Bottom