Gallerize Directive

Overview

The gallerize directive is used to create lightbox gallery from image elements or gallery components.

This directive loads the images in the gallery automatically, you don't need to load them manually.

Gallerize has 2 modes:

If you haven't installed the module in step 1 see the Getting Started Guide

Auto-detect images

There are use cases when images are received as HTML format, this directive takes the headache of fetching the src paths for you and connect them automatically to the lightbox.

Basic example

By default, Gallerize will process all img elements, but you can limit that to elements with a specific selector.

Selector example

Detect background images of elements with selector .gallery-img

Use with Component

Gallerize is also compatible with the component, if you want to trigger the lightbox on a gallery item's click, just add gallerize on your gallery component.

Code