🔧 Moodle Modal Generator

Generate Moodle-ready code where clicking a thumbnail opens a larger image in a modal.

Before you start: You’ll need a Moodle image URL.
  1. Open a Moodle page and launch the text editor (e.g., label, page, or book activity).
  2. Use the editor’s Insert image tool to upload your screenshot or diagram.
  3. Once inserted, right-click the image → Copy image address or use the HTML-source viewto grab it.
  4. The link will look like: https://yourmoodleurl.com/draftfile.php/5/user/draft/657120892/myimage.png
  5. Use that URL into the generator.

Quick Bookmarklet Method

Drag this bookmarklet to your bookmarks bar. Click it on any page to get a ready-made code snippet.

🚀 Modal Generator
👆 Drag this button to your bookmarks bar

Form Method

Fill out the form for more control over the generated code:

Copy JavaScript Code

If you prefer, copy this JavaScript directly and save it as a bookmark’s URL: