how to make a repeater image open an URL link from a dataset?

I have a repeater that gets info from #Dataset1 and in the dataset i have the fields “titles” “image” and “URL”.

The image in my repeater is alread connected to the image field in my Dataset1. Now what i want to do is when on click the image a link opens from the relative URL in the Dataset1 to the image loaded

What I was tying to do:

export function image20_click(event) {
    $w.item("#Dataset1").link = itemData["link"];
}

What am I doing wrong? Could someone share a light?

The forum search is a wonderful tool :wink:
https://www.wix.com/corvid/forum/community-discussion/problems-linking-repeater-background-to-urls
https://www.wix.com/corvid/forum/community-discussion/how-can-i-add-a-dynamic-link-to-the-container-of-a-repeater

Thank you GOS for your kind answer.