Module:Infobox: Difference between revisions

From Vintage Story Wiki
m
Added image extension detection
m (Added image extension detection)
m (Added image extension detection)
Line 26: Line 26:
end
end
elseif args.image then
elseif args.image then
imageString = '[[File:' .. args.image .. '.png|180px]]' -- forcing 180px as it can't seem to use the size variable
local image = args.image
if image:match('(.*).png') or image:match('(.*).jpg') or image:match('(.*).svg') then imageString = '[[File:' .. image .. '|180px]]'
else
imageString = '[[File:' .. image .. '.png|180px]]'
end
else
else
imageString = ''
imageString = ''
Confirmedusers, Interface administrators
1,131

edits