To work on this, you must have successfully finished the task "[Lua task #1] Set up your sandbox for programming in Lua on English Wikipedia" before!
A Wikipedia page can call a Lua module to do calculations, process text, format citations, fetch information from Wikidata, and many other jobs where a programming language is needed to get a result.
- A Lua module is used inside a Wikipedia page by using a call something like
{{#invoke:RexxS|carousel}}
Type or copy that line as a new line at the end of your sandbox (not your sandbox module) and save it. You should see the filename of a JPG image. The line makes use of a module called Module:RexxS. Modules can contain many functions and the line you have entered calls a function in that module called "carousel".
- Modify that line to read
[[File:{{#invoke:RexxS|carousel}} | thumb]]
and save it.
This uses the standard MediaWiki image syntax to display the image. You can read a lot more about image syntax if you are interested.
- Look at https://en.wikipedia.org/wiki/Module:RexxS and examine the code. See if you can work out how the function picks a filename. You may find the documentation helpful to learn how Lua works.
In your sandbox, on a new line, write down the name of the list (a Lua table) that stores the filenames.