Yeah you can do relative links really easily, it is basically like this:
You use your current location ( the directory your in ) as the base, so, your current page is: http://www.example.com/user/profile.php and you want to link to: http://www.example.com/user/user_dat...image_file.jpg
Then you just put this in the link:
user_data/images/uploads/image_file.jpg