Module:Animate

local p = {} function p.animate( f ) local args = f if f == mw.getCurrentFrame then args = f:getParent.args end local size = args.size or '128px' local link = args.link or '' if size ~= '' then size = '|' .. size end

if link ~= '' then link = '|link=' .. link end local images = {} for _,v in ipairs(args) do   if #v > 0 then if v ~= '' then table.insert(images, ' ') end end end

images[1] = images[1]:gsub( '^ ', ' ' ) return ' ' .. table.concat( images ) .. ' ' end return p