Just use $image->name as a reference. If the same image is added twice, a unique name is generated for the second one (just like when you add identically titled pages under the same parent).
Sorry, just copy&pasted from my code, so I used {} instead of php tags as the snippet I copied from was within a PHP echo().
<?php echo $config->urls->templates; ?>bbp/img/logo.jpg
should always point at the same logo at "[YOUR PW DIRECTORY]/site/templates/bbp/img/logo.jpg". Basically, it shouldn't matter if you're using $config->urls->root or $config->urls->templates, the latter is just a little shorter and more "speaking".
I'm not completely following what you mean with "on the page itself while inserted in the article". Can you give an example?