local p = {}
function p.data(frame)
local args = frame.args[1] or frame:getParent().args[1]
local file = args[1] and mw.title.new(args[1]).file or {width = '?', height = '?'}
if args[2] == 'width' then
return file.width
elseif args[2] == 'height' then
return file.height
elseif args[2] == 'size' then
return file.size
end
return '???'
end
return p