Next & Previous (slideshow)

I have a RG.
When a picture i clicked, pop-up appears and the picture is seen in large.
Underneath the picture there is a Next & Previous field.
When clicked I want to show the next or previous picture from the RG.
How do I best do this?
In the workflows I only find “show next RG”, but if I choose this, the content of the RG changes, not the picture in the popup.

Repeating Group is list of your data type / image

Each cell contains a group or image that fills the background / image with Current cell’s X’s image

Have a popup of type image. When cell is clicked, display data Current cell’s image in the popup. This will set the source of the popup to the clicked image and update the image in your popup (assuming you set the image source to Popup’s image)

I know this works, but I want, when the pop up is opened and they click on Next in this popup that the next picture from the RG that was orignaly clicked gets shown.