resolve image storing issue