Examples of displaying images individually and combining into a gallery
Add data-fancybox attribute to any link to enable fancyBox
Groups are created by adding the same data-fancybox attribute value
To show only one or a few images but have a large gallery, simply hide the rest of the links.
Optionally, use data-thumb for thumbnail image.
data-width and data-height attributes to predefine image dimensions.
It is recommended to use these attributes for SVG files.
data-caption attribute.
data-* attributes to set any option. For example, data-small-btn="true" would display small close button on top of the image and hide the toolbar.
Sometimes you might need to start fancyBox from different element - simply use data-fancybox-trigger attribute with the value of fancyBox group name.
This allows to avoid content duplication in the gallery. For example, show fancybox when clicking on featured image: