Yes your code should work. Try it out this way
sym.$("image1").attr("src", "images/image2.jpg");// where image2.jpg is placed inside the images folder in the composition directory.Further, make sure that for the image "image1" on stage , you have change it to img tag instead of div.
Thanks and Regards,
Indeed, when you use attr, you will need to change the image from div to img.
Another way would be to use the css background-image in which case you can keep the div.
Thanks, now is working