Announcement

#1 2017-10-05 20:55:06

homdax
Member
Sweden
2015-02-02
78

Persistent hot linking.

Hello/Hi/Greetings,

While using Piwigo to replace other image hosts for persistent hot linking we discovered that some types of links stop working, probably due to cached thumbnails/images/sizes.

While investigating this I found three URL formats:

A
for full image with no scaling (Original)
https://shots.lotrokin.me/upload/2017/0 … 400fe8.jpg

B
data/i/upload that goes away, probably after purging cache
https://shots.lotrokin.me/_data/i/uploa … bf4-xl.jpg

C
with image scaling that seems to be persistent
https://shots.lotrokin.me/i.php?/upload … 803-xl.jpg

Is my impression correct that option B is a link that will eventually become invalid?

I host several hundred of images for a game and some community members and I want to make sure they do this the right way and that the images in fact remain linked and live, at least as long as Piwigo and the server is in working order.

What usage do you recommend for this?

Offline

 

#2 2017-10-06 08:06:14

eliz82
Member
Romania
2016-04-27
259

Re: Persistent hot linking.

hmm, purging cache should not delete image derivatives. maybe you have disabled XL version in your Piwigo admin options.
... or maybe your original uploaded image is smaller then the sizes set for XL in admin options? in this case i don't know if XL version is created.

but most safe derivatives is square, thumbnail, medium and original. the rest of them can be disabled by the admin.

Last edited by eliz82 (2017-10-06 08:08:30)

Offline

 

#3 2017-10-06 08:40:03

homdax
Member
Sweden
2015-02-02
78

Re: Persistent hot linking.

M
L
XL and
XXL

are enabled in admin.

As specified above url's to images containing

" */data/i/upload* "

stop working after a while (unclear how long, nothing measured).

Just after the RIGHT way to do this. Hotlinking is intended and must work or I can just close down the site since that is its purpose...

Offline

 

#4 2017-10-06 11:04:20

teekay
Member
2013-06-12
409

Re: Persistent hot linking.

/data/i/upload/ is the direct (filesystem) path where uploaded originals and derivatives are stored.

If the derivatives aren't generated yet, or if someone (admin) decided to delete all cached derivatives, then they are, well, deleted from the filesystem.

i.php is a wrapper and will take care the requested derivative gets cached, so this should be working all the time.

If you set

Code:

$conf['derivative_url_style']=1;

in local/config/config.inc.php, derivatives will always have the i.php script style urls in Piwigo, which makes life easier to find the right link then.

Last edited by teekay (2017-10-06 12:49:30)

Offline

 

#5 2017-10-06 11:40:59

homdax
Member
Sweden
2015-02-02
78

Re: Persistent hot linking.

Thanks teekay... :)

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact