How are you using the url?
It is usually a good idea to keep the full url path in the code, and only store the image name in the database. That way if you change the location of your image folder, you can modify your php code rather than all the records in the database.
<img src="images/<? echo $img_from_db ?>">