Your Moodle version

Activities: Lightbox Gallery

Maintained by Picture of Andrew Hancox Andrew Hancox, Picture of Adam Olley Adam Olley
This resource allows you to create 'Lightbox' enabled image galleries within your Moodle course. As a course teacher, you are able to create, edit and delete galleries. Smallthumbnails will then be generated, which are used for the thumbnail view of the gallery.
Moodle 2.3, 2.4, 2.5, 2.6

Clicking on any of the thumbnails brings that image into focus, and allows you to scroll through the
gallery at your leisure. Using the Lightbox scripts creates nice transition effects when loading and
scrolling through the images.

For Moodle 2.x, YUI version:


Maintained by: NetSpot <>
Original plugin by: Paul Holden <pholden[at]greenhead[dot]ac[dot]uk>.

For the Moodle 1.9 jQuery version:

Moodle jQuery Lightbox Gallery v1.0.0 (16th Nov 11)


Ported to jQuery from:
Lightbox Gallery v2.2.1 (12th May 09)
by Paul Holden pholden[at]greenhead[dot]ac[dot]uk

Port performed by Andrew Hancox at Kineo.

External documentation URL:
Source control URL:
Bug tracker URL:
Website URL:


This plugin is part of set Lightbox Gallery.


Screenshot #0
Screenshot #1


Picture of Andrew Hancox
Andrew Hancox (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Just wondering . . .
    Fri, May 23, 2014, 8:50 AM
    Any idea on an ETA for a 2.7 version?
    Just curious, as we start the upgrade testing
  • Picture of Nicolas Dunand
    Fri, May 23, 2014, 8:07 PM
    Hi, I just filed a pull request on GitHub, fixing these deprecated get_context() calls. Deprecated add_to_log() calls still to be fixed.
  • Picture of Adam Olley
    Tue, Jun 3, 2014, 3:15 PM
    Hi all,

    I've begun work on getting lightboxgallery working on 2.7. Strictly speaking, it should already work, however several parts of it are using deprecated functions/api's that need updating.

    I've flagged the following bits as needing attention for a 2.7 version.
    a) context classes (thanks to @ndunand for the context fixes - they've been merged in now.)
    b) Port add_to_log calls to events.
    c) Migrate comments to core comment API - lightboxgallery doesnt do anything fancy that core comments cant handle.
    d) fullname requiring additional name fields from queries to {user}.

    (a) has already been done as noted. I've partly completed (b) and am working on (c). I expect to have these all finished and a 2.7 version available this week.
  • Picture of Adam Olley
    Wed, Jun 4, 2014, 12:32 PM
    I've uploaded a version marked as a release candidate for 2.7. It takes care of a, b and d above. I haven't done (c) as it would actually make a few places in the module slower or more clumsy. Something for the future anyway.

    I also updated the user_complete and user_outline modules in lib.php to not require use of the {log} table. Lastly, I updated the javascript used for the lightbox to the version @brum1975 made a pull request with.

    Please file an issue on github if you try out the 2.7 version and run into any problems.
  • Picture of Alexander Deichman
    Mon, Jun 9, 2014, 10:41 AM
    I just left a comment on the discussion forum for a new future request: social image gallery - ability to add comments to picture(like facebook). Is it possible? From php and db perspective, it sure looks like it is but I haven't really looked too close.
  • Picture of Richard Chui
    Mon, Aug 4, 2014, 2:41 PM
    Is it possible to use Lightbox Gallery for videos? Thanks.
  • Picture of Adam Olley
    Mon, Nov 24, 2014, 11:37 AM
    @Richard Chui, @Alexander Deichman: You might want to take a look at Media collection.

    It has a flickr-esque interface where you can like things and leave comments. It also supports audio, images and video.

    One difference it has from lightbox gallery, is that it lets any user create a gallery. But an update is coming soon to it that will allow you to limit creating galleries/items inside the collection to just the instructor (but allowing students to still comment).
  • Just wondering . . .
    Tue, Feb 17, 2015, 11:59 AM
    Will this work for Moodle 2.8+ ??

  • Picture of Adam Olley
    Thu, Feb 19, 2015, 7:37 AM
    Hi Derek,

    I'm not aware of any issues with running it on M2.8. And the only reason the current build isn't flagged as being available for M2.8 here is because I haven't had the time to do some proper testing to verify that for myself.

    If you go ahead and try it on a 2.8 and run into any problems; let me know, I'll be happy to look into them.
  • Picture of Georg Wiesinger
    Tue, Mar 3, 2015, 2:45 AM
    Hi! I have been testing this wonderful gallery for a while now on moodle 2.8.3 and I think there are no issues so far.

    I don't know if it depends on my moodle installation but opening an image is not that smooth, even with small images!

    Howsoever, I love it!
  • Picture of S. Ali
    Thu, Apr 16, 2015, 5:29 AM
    I've just upgraded Moodle to Moodle 2.8.5+ (Build: 20150414) and am now getting the following error messages with the plugin:

    Class 'textlib' has been renamed for the autoloader and is now deprecated. Please use 'core_text' instead.

    line 102 of /lib/classes/component.php: call to debugging()
    line ? of unknownfile: call to core_component::classloader()
    line 417 of /mod/lightboxgallery/lib.php: call to spl_autoload_call()
    line 210 of /mod/lightboxgallery/imageclass.php: call to lightboxgallery_resize_text()
    line 157 of /mod/lightboxgallery/view.php: call to lightboxgallery_image->get_image_display_html()

    Any assistance will be greatly appreciated.
    Many thanks.
  • Picture of Adam Olley
    Thu, Apr 16, 2015, 8:21 AM
    Hi S.Ali,

    You can try the most recent code available on github, it contains a fix for that specific error.
  • Picture of S. Ali
    Thu, Apr 16, 2015, 8:45 AM
    Thanks a lot. That solved the problem.
  • Picture of Nacho Aguilar
    Thu, May 7, 2015, 3:26 PM

    Is there an option for downloading a picture in lightbox gallery as a student ?
    I mean a link or button not just right mouse click and 'download as'
  • Picture of Adam Olley
    Fri, May 8, 2015, 8:09 AM
    Hi Nacho,

    Currently there isn't any special buttons/options for downloading images.
1 2 3 4 5 6
Please login to post comments