Page MenuHomePhabricator

Transform image name into real URL
Closed, ResolvedPublic

Description

Author: josh.hight

Description:
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.


Version: unspecified
Severity: enhancement

Details

Reference
bz9142

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:35 PM
bzimport set Reference to bz9142.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

(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.

robchur wrote:

(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.