Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

New cache path?

06 Jul 2020, 09:57

Hello, in my xenforo forum I've made devloped an addon that takes the cached files and show them on the forum. Just upgraded to the latest version and these are not pulled out anymore

this is the path I had before and that always worked

https://kgallery.b-cdn.net/render/w270-q100/4.20112015/2.2012/14.080912/IMG_4260.jpg

note that kgallery.b-cdn.net is the CDN server I use.

The parameter of the addon is this one for the thumbnails images

https://kgallery.b-cdn.net/render/w270- ... image_file}

but it seem not to working anymore.

How can I fix this?
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: New cache path?

06 Jul 2020, 10:32

Basically I've to give the addon a path to take all the thumbs from my gallery to be displayed here
Screenshot 2020-07-06 16.31.32.png
Screenshot 2020-07-06 16.31.32.png (176.75 KiB) Viewed 13236 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: New cache path?

06 Jul 2020, 11:47

Do you have a link to your gallery first though? So I can see the real render paths to your images? Render request links are mostly the same, except now the cached element will be stored in the exact path as requests (instead of being redirected to PHP, which then serves the cached file from another location). Before checking the CDN version, shouldn't we be checking the actual output of these requests on server first? I do see TWO issues, and I'm guessing the first one is the problem:

1. w270 is not an "allowed" request width in X3 any more. If any request width is available, it means "bad people" or bad bots could hammer your server with requests w1,w2,w3...w999 (and so on) for all your images, creating insane processing demands on your server. Please go to Settings > Advanced > Image Resizer > "Allowed request widths", and click the [?] help icon for more info. You can add your own custom request width there, for example 270. See what happens when you request w270 on our demo for example:
https://demo.photo.gallery/render/w270/ ... apples.jpg

Use a pre-assigned allowed width like 200 or 320 (it doesn't matter if images scale down slightly in your forum). Or if you must, just assign "270" into "allowed request widths" setting.

2. This is not related to the problem, but you can remove q100 from the request width. All requests will inherit the quality that you have in Settings > Advanced > image resizer > quality. If you allow different quality, it means someone could create 100 variations of each of your images. Besides, what's the point of having this in the request, and what's the point of setting it to 100? Default 85 is already generously high.
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: New cache path?

07 Jul 2020, 02:46

You can see my gallery at https://gallery.kog.it and now I read what you've written. Thank you very much. Hope you could help me solve this :-D
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: New cache path?

07 Jul 2020, 02:54

Ok I've solved with your first suggestion putting 270 in Allowed request widths and I'll replace w270-q100 with w270 as per your suggestion. You're a pro and thank you very much indeed...