local p = {}
local function clean(s) if type(s) ~= 'string' then return nil end s = mw.text.trim(s) if s == or s:lower() == 'none' then return nil end return s end
function p.InfoboxImage(frame) local args = frame:getParent().args local image = clean(args.image) or 'No image.svg' local size = clean(args.size) or '220px' local alt = clean(args.alt) or local title = clean(args.title) local link = clean(args.link)
local result
if link then result = string.format('[[File:%s|%s|alt=%s|link=%s', image, size, alt, link) else result = string.format('' .. title end result = result .. ''
return result end
return p