some refactoring around if_image_name_on stuff; new way of parsing attributes: used on s3