0

I need a module for Drupal 8 that opens images of a node in a lightbox.

  • It must support the image field from core.

  • The lightbox must have a close button (e.g., an "X" in the top-right corner). Pressing Esc should close the lightbox, too.

  • The lightbox should provide pagination which allow cycling through all images of the node. As my nodes have multiple image fields (some with only one, some with multiple images), the pagination should ideally include all of them.

Bonus:

  • No separate library download/installation required.
  • No (uncommon) dependencies.

1 Answer 1

0

Colorbox is available as stable version for Drupal 8.

  • It works with the core image field.
  • The lightbox can be closed by clicking the "X", by clicking anywhere else on the page, or by pressing Esc.
  • It offers pagination over multiple image fields: simply select the same gallery type for each image field. It display previous/next buttons, but you can also cycle through by clicking the image.

The module doesn’t have a dependency, but the download of the jQuery plugin from https://github.com/jackmoore/colorbox is required (has to be placed in the libraries folder).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.