-- <pre>
local p = {}
function p.main(frame)
	local args = frame:getParent().args
	local images = {}
	-- I don't think I want this changing
	-- Can change later if there's demand
	local imgsize = 187 -- or tonumber(args.imgsize)
	for i, v in ipairs(args) do
		local img = {}
		img.file = v:match(':?([^:]-%.[pjg][npi][ggf])')
		local cpt = args['caption'..i] or ''
		img.caption = cpt:find('%S') and cpt or nil
	local ret = mw.html.create('div')
	for i, v in ipairs(images) do
		local _v = ret:tag('div')
			:css({ ['max-width'] = imgsize..'px',
				width = imgsize..'px',
				height = imgsize..'px' })
		local _t = _v:tag('div')
				:css({ height = imgsize..'px',
					margin = '0 auto',
					position = 'relative',
					['text-align'] = 'center' })
			:css({ ['max-height'] = imgsize..'px',
				['max-width'] = imgsize..'px'
		if v.caption then
	return ret
return p

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.