add a onclick event to the image tag that will show the delete overlay, and set the hidden element to the ID of the gallery to delete:
for example:
<img class="delete-icon" src="../images/btn-delete-large.png" onclick="document.getElementById('delete-id').value=<?php echo $row_gallery['id']; ?>;document.getElementById('overlay-delete').style.display = 'block'" />
in the delete record behavior, set the ID Value to use the delete-id hidden element.
ive tride to do this example, the overlay popup works. but the info is not passed please check the page for me thanks