Change image with button onclick

I’m looking to change an image with a button onclick. I’ve tried the usual ways using jquery by assigning an ID to the photo module, but it does not change the image source. I assume I need to go a layer deeper to access the photo module? Unable to find anything about this anywhere, unfortunately.

jQuery(document).ready(function($){
    jQuery(".button-onclick").click(function () {
         $("#change-image").attr("src","imgurl");
    });
});
1 Like