Added parse-img function.