Connecting media gallery to lightbox

When clicking o a repeater, it opens a lightbox with images from media gallary, that is connected to a database.

But no matter what reapeater I click, it only shows the first row(database) of Media Gallery. How do I solve this? Thanks!

When you use buttons from within a repeater you need to code them differently from how you would on a normal page element.

See the Repeater API for more info about this.
https://www.wix.com/corvid/reference/$w.Repeater.html

If you had searched before posting this too as stated in our forum guidelines, you could have found old posts like this one which would explain it to you as well.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/connecting-your-database-to-lightboxes

You can see this Wix example here about actions in a repeater (inline) and actions outside of a repeater (global).
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-input-repeaters

You can also see an example about it from Nayeli (Code Queen).
https://support.totallycodable.com/en/article/open-a-lightbox-when-clicking-an-item-in-a-repeater-using-a-button