CMS Lightbox image direction

I have a question regarding creating lightbox in webflow.
I managed to follow this tutorial Introducing dynamic CMS and Ecommerce galleries | Webflow web design - YouTube

but my main image order end up in the last, so the order of the images starts from right to left.
how do I make the main image starts from the left?