ubbcode has to have the true image path to the file and not a script link to show the picture on the forums. Therefore a script link to the file is not going to show the photo inline in the forums but a red x.
You can change the direct link code similar to what Michael posted above that you did for ubbcode do the same for direct code like so
Code:
Content visible to verified customers only.