Display images in a gallery view

Are these choices as good as SimpleLightbox that was proposed by @Oana-Lavinia_Florean ? On the home page of SimpleLightbox we can see that it does some grid layout and we could keep the current impl for the single image gallery view (or modify it).

The grid display from the SimpleLightbox homepage is just for demo purpose, is not included in the library. An important feature that is missing is the support for JSON input, which is important for the possibility to have better control on what information is selected for each image.

About the captions of the Gallery library, it can be solved. In order for the library to work, you need to manually add the lightbox template (like it is done for the Bootstrap modal for example), so the layout can be modified.

In conclusion, I think the best is to go with the Gallery library.

Indeed, I forgot to mention why I excluded the rest (including SimpleLightbox): lack of support for JSON input. The problem with SimpleLightbox (and the others I excluded) is that:

  • it expects a specific HTML structure (e.g. image inside a link, where the image source is the thumbnail and the link href is the image full size URL) → this is not good because (1) we might not always be able to change the HTML structure to meet the requirements and (2) we may want to add images that are actually not included in the DOM (e.g. they are fetched asynchronously from the server; one use case is to include the page image attachments without loading the attachments tab at the bottom of the page, but by simply making a REST call to page attachments resource). Best is to be able to feed a JSON array of image meta data to the library.
  • it registers the event (click) listeners automatically → this is not good because there may be already some click listeners or the link that wraps the image may lead so other page instead of loading the full image. We talked about showing a popup / bubble on hover with the option to view the image (fullscreen). For this we need to be able to trigger the lightbox manually (with a JSON array of images and the index of the current image).

ok, thanks for the info Marius!