Jump to content

Module:ImageRatio: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
function ratio(image)
function ratio(image)
return 1
local file = image and mw.title.new('File:' .. mw.uri.decode(mw.ustring.gsub(image,'%|.*$',''), 'WIKI'))
file = file and file.file
w = tonumber(file.width) or 1
h = tonumber(file.height) or 1
r = w/h
return file
end
end

Revision as of 09:41, 31 January 2024

function ratio(image)
	return 1
end