Brianna Laugher wrote:
Hello,
1) If you know an image [[image:foo.jpg]] exists, you can do
http://domain.com/wiki/Special:Filepath/foo.jpg
to download the source file, without having to calculate your own checksum
thingy to figure out which directory it's actually stored in.
Is there a similar shortcut to image thumbnails? There is thumb.php but that
bypasses the cache so it's bad, right?
You can get this via the API...
http://en.wikipedia.org/w/api.php?action=query&titles=Image:Albert%20Ei…
Note that thumb URLs may be complicated by cross-format rendering (SVG
rasterization, DjVu & PDF page extracts, Ogg video stills), so hitting
the API will be more future-proof then hacking a URL together manually.
And on that related note,
2) If you have a central image wiki set-up (as in Wikimedia Commons/other
Wikimedia projects), how can you check if the image being referred to is
actually on the central project or the local project? Is there a
straightforward way to do that? I can think of some roundabout ways but I
don't know a straightforward one.
API's imageinfo will include a 'repository' attribute which should tell
you if it's local or shared.
-- brion