XF 1.5 XF 1.5.22 and Image Proxy

mph

Active member
Since the update to the version 1.5.22 (or maybe the version before) every picture from the XF Media Galery 1.1.17 is stored in the image proxy. Before it was only the pictures which are stored outside the forum. It wastes a lot of storage place and in the database. It is not neccessary to store the pictures from the own media galery in the image proxy!
 
Do you have an example thread where we can see this?

If I had to guess, you had users linking to images using an [img] BB code and you potentially switched from HTTP to HTTPS but those links still point to the old URL. If that's the case, proxying is the correct behavior as it's very necessary for embedding non-secure resources. Those links would need to be updated.
 
I switched to https 1 year ago. I replaced all http from my domain to https inside the database by using a database tool. The image proxy was activated later. Old URLs cannot be the reason.

Some weeks ago I checked the image proxy log. There were only 13 pages with entries. Now I have 67 pages, most of it with pictures from my own XF Media Galery.
It seems to be that every time the img-tag is used. Example:
Code:
[IMG]https://chili-pepper.de/index.php?media/golden_limon_1_f5_20180330.2005/full[/IMG]

I searched for some of the pictures in the database. The picture from the example is used in 2 posts (different threads) and there are more pictures from the galery in both posts. But only the picture from the example is stored in the image proxy and the others not. And for a other picture there is the same. It is used in different posts and together with other pictures from the galery and only one is stored in the proxy.
 
Can you link to a thread that has that image embedded (as a proxy)?

Essentially, if there is any part of the domain/protocol that is different, the link will be considered external and thus proxying is expected and correct. That means http vs https and www vs not (or some other sub-domain).

I don't believe anything changed with regards to the internal/external detection for some time, so I suspect it's something along those lines.
 
On the URL you gave me, if you view the page source, you can see that the images are not being served via the proxy.

However, if you view the URL with the www: https://www.chili-pepper.de/index.php?threads/mph-saison-2018.499/page-10#post-8114 Then you can see them being loaded with the proxy, but that's as expected based on my previous post. There are likely at least some number of users who are accessing your site with the www. Ideally, you should settle on a single canonical URL and enforce it via .htaccess. (XF 2.0 has an option built in to enforce this internally.)
 
  • Like
Reactions: mph
Thank you. I really forgot this in the .htaccess. Now I have a redirect 301 to the URL without www additionally to the redirect 301 to https.
 
After deleting the entries in the database and deleting of the files in the right folder (except the files and entries of pictures from external sites) everything is ok now.
 
Back
Top Bottom