adding remote image function and redirecting to root after adding new pin