Lightbox Gallery with CSS image resize

The Lightbox Gallery is a third party Module for Moodle maintained by Netspot AU and available from

It is a great way of sharing images with students and uses a “Lightbox” gallery to overlay full size images on screen when you click on a thumbnail view of an image.

Unfortunately the default version of the gallery does not support scaling of images to fit the view-port of the browser so if a lecturer uploads a large mega-pixel image it will not fit the screen and spoils the Lightbox effect.

I have modified the code to now support in browser image resizing. My fork is available at (a pull request has been sent to Netspot).

To see it in action visit where some oversize images have been added to a gallery so you can see it in action.

Leave a Reply

Your email address will not be published. Required fields are marked *