Changing slideshow with buttons/widgets

Hello,

I’m trying to add a feature to my website whereby the images on a slideshow would be changed by pressing different buttons on the page.

Would it be possible to achieve something like this with code?

Here’s a simplified example to hopefully explain it clearer, when the image buttons are pressed the slideshow would change to that image:

Any help would be greatly appreciated,
Thank you!