Openly licensed images in Moodle's file picker, with the credit kept
Our free repository_openverse plugin searches Openverse's 900 million Creative Commons and public-domain images from Moodle's file picker and saves each one with its creator and licence.
Short answer: teachers need pictures, and the safe ones are openly licensed, but finding one, downloading it and writing down who made it is slow work. Our free plugin, repository_openverse, puts Openverse in Moodle’s file picker. Openverse indexes over 900 million Creative Commons and public-domain images from 52 sources, including Flickr, iNaturalist, Wikimedia Commons and Europeana. Search, pick, and the image arrives with its creator and licence already filled in.
This is the thirty-second plugin in our series: one plugin for each Moodle plugin type, each one teaching DevLMS Studio, our AI plugin builder, how that type works. Moodle’s own Wikimedia repository searches one of those sources. We found no Moodle plugin for Openverse.
What it does
- Openverse shows in the file picker wherever images are accepted: pages, labels, forum posts, course images.
- Search with words and choose what the licence must allow: any open licence, commercial use, changes, or both.
- When you pick an image, the author and licence fields are already filled in, and Moodle saves them with the file. The file’s source is the image’s page on openverse.org.
- Moodle only lists the 4.0 versions of the Creative Commons licences. Many images are CC BY 2.0, and calling them 4.0 would be wrong, so for those the licence stays “not specified” and the exact one goes next to the creator: “NASA Goddard Photo and Video (CC BY 2.0)”.
- Images are copied into Moodle, not linked, so the credit stays with the file. Sensitive results are always off.
Without registering, Openverse allows a site 1,000 requests a day. A site that needs more can register with Openverse and paste its keys into the settings. This plugin uses Openverse but is not endorsed or certified by Openverse. It supports Moodle 4.5 LTS to 5.3, and the code is on GitHub.
How a Moodle repository works
From Moodle 5.3’s file picker code (the same in 4.5):
- A repository is one class. Moodle asks it for a search form, a page of results and, when someone picks a result, the file itself. Every result carries a file name, a thumbnail and optional author and licence, which the picker shows in its “Select” step.
- What comes back when someone picks a file is chosen by the browser, so a careless repository will download any address it is sent. Ours only sends the image’s Openverse id. The server asks Openverse where that image lives and downloads from there.
- Openverse limits how many requests one site can make. When the limit is hit, our search form comes back with the reason instead of an error box, so people know to wait.
- A file name needs its extension, because the picker uses it to decide which files a field accepts. Openverse often leaves the file type blank, so we read it from the image address and leave out results with no image type.
Unit tests run against a stand-in for the Openverse API: licence mapping, file names, the licence filter, rate limits and the download rule. Browser tests use the real file picker on a test site with a fake API: search, pick, save, then open the saved file and check its author and licence.
Need a plugin like this for your own Moodle?
Describe it in DevLMS Studio and watch it built and tested in a real Moodle, or ask our team for a fixed price.
Open DevLMS Studio