XF 1.5 Is There a Way to Make Image Proxy to Follow 301 Redirects?

enivid

Active member
I have image proxy enabled in my forum. When adding images through URLs that do 301 redirects, it shows a broken image icon. When testing the URL via Test Image Proxy tool, it gives the following output

<URL> could not be fetched or is not a valid image. The specific error message was: Received unexpected response code 301 (Moved Permanently)

Is there any way to make Image Proxy resolve 301 redirect URLs in XenForo?
 
@Mike since this update a lot of hosts including imgur, gyzado, postimg, lightshot do not work with the image proxifier as they often redirect to a subdomain or different URL for the actual image, could you suggest any changes to make this work?
 
Hi

Does this affects all XF versions?
I'm planning go to https in the coming months but this is very importa issue to deal with.

Thanks
 
Code:
http://i.imgur
@Mike since this update a lot of hosts including imgur, gyzado, postimg, lightshot do not work with the image proxifier as they often redirect to a subdomain or different URL for the actual image, could you suggest any changes to make this work?

Are the redirects a constant? ie if it is just http redirecting to https it is something you could batch change to the actual redirected URL using:

https://xenforo.com/community/resources/post-content-find-replace.1549/


For example, see this post:

https://xenforo.com/community/threads/post-content-find-replace.6548/page-57#post-1095415

change all

Code:
http://i.imgur

to

Code:
https://i.imgur
 
Hi

Does this affects all XF versions?
I'm planning go to https in the coming months but this is very importa issue to deal with.

Thanks
It's from 1.5.10, but it has nothing to do with moving your forum to HTTPS. It is about the redirects of the image hosting.
 
It's from 1.5.10, but it has nothing to do with moving your forum to HTTPS. It is about the redirects of the image hosting.

It is for sure related to switching you forum to https, because you will find that suddenly even with Proxy Image ticked, all those redirected images are going to show an error, so they do need to be dealt with if you intend to use any version from 1.5.10

When I switched to SSL, everything was fine until I did the upgrade to 1.5.10 :(
 
I have switched to HTTPS on 1.5.10 and nothing changed in how the images were displaying - those that have been redirecting weren't showing before and aren't showing now, those that haven't been redirecting are still showing fine. I am using XF Proxy for images by the way.

PS: Of course, I have also updated my XF database to replace all internal links replacing "http://" with "https://".
 
Top Bottom