Same issue… It seems that
$w('#image').src = ...
works fine inside a repeater element but not in other places.