Hi @ebud
I don’t think it is yet possible to use the post’s taxonomy data to update the relationship field query on the fly.
On page load, you can do this just fine as your code already shows, but you may need to ask your client to select the taxonomies first, then save the page, then select the images.
Thanks
E