Page MenuHomePhabricator

thumb.php should work with ForeignAPIRepo
Open, MediumPublic

Description

It would be really nice if thumb.php worked with ForeignAPIRepo.


Version: unspecified
Severity: minor
See also: T114098: Remote file thumb generation blocks serving a page (we now hotlink InstantCommons thumbnails, hence this is not an issue for that use case)

Details

Reference
bz25958

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz25958.
bzimport added a subscriber: Unknown Object (MLST).

I get the following error using MediaWiki 1.16.0:

Error generating thumbnail
The source file for the specified thumbnail does not exist.

I just looked at this. It seems that atm thumb.php only supports the local repository. This is a rather interesting issue. Normally, for foreign repositories, the thumb script will point to the original location of the file, if I understand correctly, for instantcommons, the thumbscript should thus be http://commons.wikimedia.org/w/thumb.php (i'm not sure if it is set at all atm).

Now the issue here is of course that we are locally caching remote thumbnails, so using a "remote" thumb.php is not really useful in this case.

I'm guessing the idea here is that for ForeignAPIrepo, you want to use the local thumb.php script to generate thumbnails on the fly ? That would require some intricate changes to thumb.php.

(In reply to comment #3)

I'm guessing the idea here is that for ForeignAPIrepo, you want to use the
local thumb.php script to generate thumbnails on the fly ? That would require
some intricate changes to thumb.php.

Yes, this.

  • Bug 49670 has been marked as a duplicate of this bug. ***

I'm guessing the idea here is that for ForeignAPIrepo, you want to use the local thumb.php script to generate thumbnails on the fly ? That would require some intricate changes to thumb.php.

Shouldn't thumb.php "just" call ForeignAPIrepo::getThumbUrlFromCache() and/or whatever normally downloads the remote thumbs? Generating thumbs locally is a waste of own CPU and remote bandwidth.

Local thumbnail generation might produce different results due to using different tools or having different parameters such as sharpening.

Remote generation is more friendly to shared hosting (you don't need to get all the tools installed to get working thumbnails). OTOH if a different revision of the of the media handler is installed locally and remotely, it could break in various ways.

Nemo_bis set Security to None.