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

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

enivid

Active member
#1
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?
 

enivid

Active member
#3
How does it undermine security?
Any plans to do anything with it?
It breaks a lot of images where image hosting has moved.
 
#5
@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?
 

Nuno

Active member
#7
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
 

Mr Lucky

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

enivid

Active member
#10
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.
 

Mr Lucky

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

enivid

Active member
#12
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://".
 

Nuno

Active member
#13
I'm not using 1.5.10 yet but I need this to work without issues.
My community lives from photos.
 
Last edited:

Nuno

Active member
#17
I have made some replacements to url from images that redirects to https.

Eventually this will be a cat and mouse job :)