Not a bug Image Proxy is messed up by 301 redirects

Alfa1

Well-known member
We imported Photopost Pro and vbalbums to XFMG. Posts with links to such images should be redirected to XFMG. But the image proxy messes up the urls.
The old URL: /photopost/data/500/sarsala.jpg
Is 301 redirected to the new URL: /media/sarpa-salpa-fish.8705/full
But the proxy creates this mess: /proxy.php?image=http%3A%2F%2Fwww.forum.com%2Fphotopost%2Fdata%2F500%2Fsarsala.jpg&hash=8c3893f942b652d955dcd93ff6aaa2c4

Which obviously fails.
Now the weird thing is that the image proxy log and the image proxy test show the image perfectly. But the post does not.
 

Alfa1

Well-known member
Please consider to modify XenForo's image proxy functionality so that it allows 1 internal redirect.
 

Mike

XenForo developer
Staff member
The image proxy does follow 301s/redirects (in fairly recent versions). The fact that the image proxy test works would demonstrate that. The image showing in the image proxy log would also indicate that the image has been cached locally correctly.

So I'm not really sure what you're reporting.

But the proxy creates this mess: /proxy.php?image=http%3A%2F%2Fwww.forum.com%2Fphotopost%2Fdata%2F500%2Fsarsala.jpg&hash=8c3893f942b652d955dcd93ff6aaa2c4
Logically, if the image needs to be loaded from a proxy, the URL needs to be changed to go through the proxy, so this is 100% expected. You can very likely test this here and confirm that the image works and the URL that loaded it.
 

Alfa1

Well-known member
Because I use https and offsite images need to be proxied to avoid mixed content security warnings from browsers.
 

Mike

XenForo developer
Staff member
Generally speaking, these instances weren't returning images that the proxy could access, so this was expected.
 
Top