Last modified: 2007-07-07 03:39:09 UTC
In order to facilitate SOA types of publishing, Wikimedia needs to provide some mechanism for consistent image retrieval based on image markup to avoid having to make several requests to retrieve an image. At the moment, image markup elements in Wikimedia documents do not provide any information about the true URL path to the image. Nor is there any utility or service in Wikimedia to fetch the image's URL based on the Wikimedia entry and/or the image markup. This approach assumes the rendering engine always has access to the database when rendering images. This limits syndication options. A reasonable, simple solution would be to provide a simple image lookup service. Following the conventions established by api.php and query.php, this service would be accessible directly via GET, and would accept at least two parameters: entry ID (or entry title, if preferred) and image relative URL (the URL used in the markup document). The result could either be the image directly (requiring a dynamic Content-Type header) or, more simply, an XML document with the direct URL path to the image in the response document. This solution is a more desirable approach, as it would not require any modification to existing image markup.
(In reply to comment #0) > information about the true URL path to the image. Nor is there any utility or > service in Wikimedia to fetch the image's URL based on the Wikimedia entry You can, in fact, access this information using the FileInfo extension which is installed on Wikimedia wikis; see Special:Fileinfo. I'm repurposing this to a request to include this in the main API.
(In reply to comment #1) > You can, in fact, access this information using the FileInfo extension which is Bah, that's the FilePath extension; Special:Filepath.
Image commons in query.php has been fixed. Until API implements it, you can use query.php: http://en.wikipedia.org/w/query.php?what=imageinfo&iiurl&titles=Image:Albert_Einstein_Head.jpg&iishared
Fixed in r23819.