How to remove an image by code?

I have written this code and to me it looks fully logical but it doesn´t work so please tell me why?

$w ( ‘#deleteButton1’ ). onClick ( async () => {
wixData . get ( “Members” , wixUsers . currentUser . id )
$w ( “#dynamicDataset” ). setFilter ( wixData . filter ()
. eq ( “Members” , “profilePhoto1” ));
let profilePhoto1 = $w ( “#dynamicDataset” ). getCurrentItem ();
$w ( “#deleteButton1” ). label = “Deleteting…” ;
wixData . remove ( “Members” , profilePhoto1 )
. then ( () => {
setTimeout (() => {
$w ( “#dynamicDataset” ). refresh
}, 1000 );
})
})