Assigning value to image attribute of event