OOPS - It did not work perfectly. The url prefix s getting inserted whenever the page is updated NOT just when the user adds pictures.
If you add a new image it works. But if you update the page without adding a new image it does not work.
Please see PM.