trying to pass an image as an attribute and failing