grabbing attributes of image instead of the whole tag