refactor setting imgUrl