Page MenuHomePhabricator

Request library for accessing file metadata
Closed, ResolvedPublic


It would be useful to be able to access file metadata from Scribunto, particularly the height and width of images. This has already been requested a couple of times on [[Wikipedia:Lua requests]]:

Is there any chance of getting a new library to enable this functionality?

Version: unspecified
Severity: enhancement
See Also:



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:51 AM
bzimport added a project: Scribunto.
bzimport set Reference to bz52522.
bzimport added a subscriber: Unknown Object (MLST).

texuguinho wrote:

Specifically, this will be useful on Wikivoyage, where every main namespace page has a banner image which must have a 7:1 aspect ratio. We need a way to check and tag them automatically for cropping, instead of always checking the file pages one-by-one and doing the math.

I just come here to request the same. I was planning to write some code for automatically creating KML files for georeferencing map images, based on 3 anchor points where user provides latitude and longitude for 3 points on the map. Dimension of the image is one of the elements I would need to have. I was surprised to discover we could not access it.

See also this wikitech-l discusion:

This should probably be closed.

The height and width of an image was exposed to lua in

Snaevar claimed this task.

as per my previous comment and due to the fact that Ricardisamoa has not repurposed this bug.

Snaevar set Security to None.