Tutorial - Dynamic Multi-Image Slider

View example

This tutorial will give you the ability to have a slider with the amount of slides based on the amount of images placed in the Multi-Image field.
You will be able to design the slider the way you like it.

Keep in mind, a Multi-Image field can be used only in CMS Collection Pages.


To get started (assuming you have already a collection with a Multi-Image field).
Place a Slider from the Elements panel.
Give the Slider the ID  MultiImageSlider


Set a background image to a Slide, set to Cover and Position Center (Don't choose any image yet).


Duplicate the slide to have 25 times. (a slide for each potential image in the Multi-Image field, the custom code will later delete the unnecessary slides).

‍We are now done with the Slider.


Place a Collection on the page (this Collection will be visible only in the Design mode, and be hidden on the published site, the purpose of this Collection is to place the images on the page, the custom code will take each image and place it on a slide).

Bind the Collection to the Multi-Image field.


Give the Collection wrapper the ID: MultiImageCollectionWrapper


Set a background image for each "collection item" to be inherit from the Multi-Image field.

If your page looks similar to this than you're almost there, the only thing missing is to paste the custom code that makes the magic happen!

Now for the fun part.


Copy this code:

Paste the code into the Body of the page:


Click Save. Publish the site and go watch the magic in the live website :)

Bonus: This code will remove the left / right arrows and the slider nav if there's only one image in the Multi-Image field.

Don't hesitate to contact me here if you have any difficulties.