Extract image to attribute.